Airline reservation system

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cotty
    New Member
    • Sep 2007
    • 1

    Airline reservation system

    AIRLINE RESERVATION SYSTEM

    A small airline has just purchased a computer for its new automated reservations 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 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 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, decision structures and files 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.
  • Studlyami
    Recognized Expert Contributor
    • Sep 2007
    • 464

    #2
    you should read the 2 sticky threads at the top.

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      Please read the posting guidelines.

      Comment

      Working...