Facebook Sharer
选择您要替换的背景颜色:
【农历新年】背景图片:
个性化设定
 注册  找回密码
查看: 968|回复: 1
打印 上一主题 下一主题

C的问题,请各位给点意见,

[复制链接]

0

主题

0

好友

4

积分

入门会员

跳转到指定楼层
1#
发表于 2009-9-4 07:39 PM |只看该作者 |倒序浏览
AIRLINE RESERVATION SYSTEM

A small airline has just purchased a computer for its new automated reservation system. The president has asked you to program the new system in C. You are to write a program to assign seats on each flight of the airline’s only plane (capacity: 20 seats). Your program should display the following menu alternatives:

        Please type 1 for “business”
        Please type 2 for “economy”

If the person types 1, then your program should assign a seat in the business class (seats 1-5). If the person types 2, then your program should assign a seat in the economy class (seats 6 – 20).  Your program should then print a boarding pass indicating the person’s seat number and whether it is in the business or economy class of the plane. Use a single-scripted array to represent the seating chart of the plane. Initialize all the elements of the array to 0 to indicate that all 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 never assign a seat that has already been assigned. When the business class is full, your program should ask the person if it is acceptable to be placed in the economy class (and vice versa). If yes, then make the appropriate seat assignment. If no, then print the message “Next flight leaves in 3 hours”.

Basic Requirements:

Assign a seat either in the business or economy class.
Display a boarding pass
Display seating chart with indication of assigned or not assigned
Validation – no seat that has been assigned can be re-assigned
Re-assign seat if the class is full

You may design the system in any way you feel that meets the system’s requirement.  You may include menus that you feel are relevant to navigate around the system.  Eventually there should be an end to the system.  Use quit to exit the system.  

You may use structures, arrays, loops and decision structures in your program.  You may include any extra features e.g. sorting the boarding passes by name, which you may feel relevant and that adds value to the system.

我不知道要从哪里下手!em0034




收藏收藏0

7

主题

1

好友

5108

积分

一流名嘴

Rank: 12Rank: 12Rank: 12

2#
发表于 2009-9-4 07:57 PM |只看该作者
原帖由 幽默女孩 于 2009-9-4 07:39 PM 发表
AIRLINE RESERVATION SYSTEM

A small airline has just purchased a computer for its new automated reservation system. The president has asked you to program the new system in C. You are to write  ...



新手要是不清楚怎么着手的話可以先画出你的 UI Diagram
然后才跟着你的 Diagram 編寫


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

JBTALKS.CC |联系我们 |隐私政策 |Share

GMT+8, 2025-1-10 09:45 AM , Processed in 0.130122 second(s), 33 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

Ultra High-performance Dedicated Server powered by iCore Technology Sdn. Bhd.
Domain Registration | Web Hosting | Email Hosting | Forum Hosting | ECShop Hosting | Dedicated Server | Colocation Services
本论坛言论纯属发表者个人意见,与本论坛立场无关
Copyright © 2003-2012 JBTALKS.CC All Rights Reserved
合作联盟网站:
JBTALKS 马来西亚中文论坛 | JBTALKS我的空间 | ICORE TECHNOLOGY SDN. BHD.
回顶部