Visual C ++。NET - 帮助! [英] Visual C++.NET - Help!

查看:53
本文介绍了Visual C ++。NET - 帮助!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名编程学生,最近错过了两周的学校,因为车祸造成了严重的伤害。我正在完成我的所有

作业(通过实验室),但是遇到了以下实验室,并且看起来不可能将b * b放在一起。场景:

一家小型航空公司刚刚为其新的自动

预订系统购买了一台电脑。您被要求对新系统进行编程。你需要写一个程序,在航空公司唯一的

飞机的每个航班上分配座位(容量:10个座位)。

您的程序应显示以下备选菜单 - 请输入

1作为头等舱请输入2作为经济。如果此人输入1,

您的计划应在头等舱(座位1 - 5)中分配一个座位。

如果该人员输入2,您的计划应分配经济中的一个席位

部分(席位6-10)。你的程序应该打印一张登机牌

表示该人的座位号以及是否在飞机的头等舱或
经济舱内。


使用单下标数组来表示飞机的座位表。

将数组的所有元素初始化为0表示座位是

为空。在分配每个座位时,将

数组的相应元素设置为1以表示座位不再可用。


您的程序应该是当然,永远不要指定已经分配的座位

。当第一节课满员时,你的课程应该询问

的人是否可以被置于经济部分。部分(和副词
$ b $反之亦然)。如果是,则进行适当的座位分配。如果没有,那么

打印消息下一班航班将在3小时内离开。


有什么建议吗?我有一些想法,但我宁愿听到其他一些

的想法...


提前致谢,


Simon

解决方案



" Simon" < Me@overthere.com>在消息中写道

新闻:Rj ***************** @ newsread2.news.atl.earthl ink.net ...

我是一名编程学生,由于车祸严重受伤,最近错过了两周的学费
。我正在完成我的所有
任务(通过实验室)但是遇到了以下实验室,并且不能将b $ b放在一起。场景:


[snip]

有什么建议吗?我有一些想法,但我宁愿听到其他一些想法...




我的建议是自己做作业。如果你遇到困难,那就发布你在这里编写的代码
。这种做事方式有几个优点。这意味着我们知道你所坚持的是因为你已经给了我们特定的东西。这意味着我们可以判断你的能力水平,因为我们可以看到你已经写过的代码了。

最后证明你并不只是想得到其他人为你做的工作

给你。


这项任务似乎很容易,所以我猜你被困了

因为这是你写过的第一个非平凡的节目,而且你不知道从哪里开始。如果是这种情况,那么只需潜入并开始编写代码即可获得
。不要试图计划你脑子里的整个事情和

绝对不要试图一次性编写整个程序。相反,

准备逐渐完成到完成的程序,进行实验,以及

抛弃代码,如果事情没有成功,就重新开始。


john


2004年6月26日星期六17:25:05 GMT,西蒙 < Me@overthere.com>写道:

我是一名编程学生,最近错过了两周的学校,因为车祸严重受伤。我正在完成我的所有作业(通过实验室),但是遇到了以下实验室而且似乎无法将它们放在一起。场景:

一家小型航空公司刚刚为其新的自动化预订系统购买了一台计算机。您被要求对新系统进行编程。你要编写一个程序,在航空公司唯一的
飞机的每个航班上分配座位(容量:10个座位)。

你的程序应该显示以下菜单备选方案 - 请输入
1作为头等舱请输入2作为经济。如果这个人输入1,那么你的程序应该在头等舱(座位1 - 5)中分配一个座位。
如果这个人输入2,你的程序应该在经济中分配一个席位部分(座位6-10)。你的程序应该打印一张登机牌
表示该人的座位号以及是否在飞机的头等舱或经济部分。

使用单一的 - 下标数组代表飞机的座位表。
将数组的所有元素初始化为0,表示座位是空的。在分配每个座位时,将
阵列的相应元素设置为1以指示座位不再可用。

您的程序当然应该从不指定座位已经分配了。当第一节课满员时,你的课程应该询问
人是否可以接受经济课程。部分(和反之亦然)。如果是,则进行适当的座位分配。如果没有,那么打印消息下一班航班将在3小时内离开。

有什么建议吗?我有一些想法,但我宁愿听到其他一些想法...



请先提出您的想法。

-

Bob Hairgrove
没有********** @ Home。 com


Simon发布:

我是一名编程学生,最近错过了两周的学习时间因车祸严重受伤。我正在完成我的所有作业(通过实验室),但是遇到了以下实验室,并且似乎无法将它们放在一起。




尝试另一个故事,我仍然不会怜悯你做完你的作业

你。

-JKop


I am a programming student and have recently missed two weeks of school due
to a serious injury in a car accident. I am completing all of my
assignments (via Labs) but have come across the following lab and can''t seem
to put it all together. The scenario:
A small airline has just purchased a computer for its new automated
reservations system. You have been asked to program the new system. You
are to write a program to assign seats on each flight of the airline''s only
plane (capacity: 10 seats).

Your program should display the following menu of alternatives - Please type
1 for "First Class" and Please type 2 for "Economy". if the person types 1,
your program should assign a seat in the first class section(seats 1 - 5).
If the person types 2, your program should assign a seat in the economy
section (seats 6 - 10). Your program should print a boarding pass
indicating the person''s seat number and whether it is in the first class or
economy section of the plane.

Use a single-subscripted array to represent the seating chart of the plane.
Initialize all the elements of the array to 0 in indicate that the seats are
empty. As each seat is assigned, set the corresponding elements of the
array to 1 to indicate that the seat is no longer available.

Your program should, of course, never assign a seat that has already been
assigned. When the first class section is full, your program should ask the
person if it is acceptable to be placed in the "Economy" section (and vice
versa). If yes, then make the appropriate seat assignment. If no, then
print the message "Next flight leaves in 3 hours."

Any suggestions? I have a few ideas but I would rather hear some other
ideas...

Thanks in advance,

Simon

解决方案


"Simon" <Me@overthere.com> wrote in message
news:Rj*****************@newsread2.news.atl.earthl ink.net...

I am a programming student and have recently missed two weeks of school due to a serious injury in a car accident. I am completing all of my
assignments (via Labs) but have come across the following lab and can''t seem to put it all together. The scenario:

[snip]

Any suggestions? I have a few ideas but I would rather hear some other
ideas...



My advice would be to do the assignment yourself. If you get stuck then post
the code you have written here. This way of doing things has several
advantages. It means that were know what you are stuck on because you have
given us something specific to work with. Its means that we can judge your
level of ability because we can see the code you have already written.
Finally it proves that you aren''t just trying to get others to do your work
for you.

This assignment does seem very easy, so I''m guessing that you are stuck
because it is the first non-trivial program you have ever written, and you
aren''t sure where to start. If that is the case then just dive in and start
writing code. Don''t try to plan out the whole thing in your head and
definitely don''t try to write the whole program in one go. Instead be
prepared to work gradually to the finished program, to experiment, and to
throw code away and start again if things aren''t working out.

john


On Sat, 26 Jun 2004 17:25:05 GMT, "Simon" <Me@overthere.com> wrote:

I am a programming student and have recently missed two weeks of school due
to a serious injury in a car accident. I am completing all of my
assignments (via Labs) but have come across the following lab and can''t seem
to put it all together. The scenario:
A small airline has just purchased a computer for its new automated
reservations system. You have been asked to program the new system. You
are to write a program to assign seats on each flight of the airline''s only
plane (capacity: 10 seats).

Your program should display the following menu of alternatives - Please type
1 for "First Class" and Please type 2 for "Economy". if the person types 1,
your program should assign a seat in the first class section(seats 1 - 5).
If the person types 2, your program should assign a seat in the economy
section (seats 6 - 10). Your program should print a boarding pass
indicating the person''s seat number and whether it is in the first class or
economy section of the plane.

Use a single-subscripted array to represent the seating chart of the plane.
Initialize all the elements of the array to 0 in indicate that the seats are
empty. As each seat is assigned, set the corresponding elements of the
array to 1 to indicate that the seat is no longer available.

Your program should, of course, never assign a seat that has already been
assigned. When the first class section is full, your program should ask the
person if it is acceptable to be placed in the "Economy" section (and vice
versa). If yes, then make the appropriate seat assignment. If no, then
print the message "Next flight leaves in 3 hours."

Any suggestions? I have a few ideas but I would rather hear some other
ideas...


Your ideas first, please.
--
Bob Hairgrove
No**********@Home.com


Simon posted:

I am a programming student and have recently missed two weeks of school
due to a serious injury in a car accident. I am completing all of my
assignments (via Labs) but have come across the following lab and can''t
seem to put it all together.



Try another story, I''ll still don''t pity you enough to do your homework for
you.
-JKop


这篇关于Visual C ++。NET - 帮助!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆