JBTALKS.CC

标题: C的问题,请各位给点意见, [打印本页]

作者: 幽默女孩    时间: 2009-9-4 07:39 PM
标题: C的问题,请各位给点意见,
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
作者: Super-Tomato    时间: 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 (https://jbtalks.my/) Powered by Discuz! X2.5