Please help me with following problem (I am struggling in a class that I really shouldn't have taken, and I have absolutely no idea where to start, or how to continue with it):
Write a program that can be used to assign seats for a commercial airplane. The airplane has 13 rows, with six seats in each row. Rows 1 and 2 are first class, rows 3 through 7 are business class, and rows 8 through 13 are economy class. The program must prompt the user to enter the following information:
a. Ticket type (first class,business class,economy class)
b. Desired seat
Output the seating plan in the following form:
A B C D E F
R1 XXX
R2 *XXX
R3 **XXX
R4 XXXX
R5 XX
R6 XX
R7 XXX
R8 *XXX*
R9 XXXX
R10 XXXX
R11 **XX
R12 **XXX
R13 ****X
Here, * indicates that the seat is available; X indicates that the seat is occupied. Make this a menu-driven program; show the user's choices and allow the user to make the appropriate choices.
In addition, the program should begin by presenting a menu that has the following items to choose from: "Assign a Seat"; "Cancel a Reservation"; "Print the Seating Chart"; and "Exit the Program". Once a selection is made, process that selection. Break down the "Assign a Seat" into three separate choices: "Assign a First Class Seat"; "Assign a Business Class Seat"; and "Assign an Economy Seat".
Your should only print the seating chart when that selection is chosen from the menu.
The seating chart should only print when the "Print the Seating Chart" selection has been made, and must be initialized to all seats available.
stephaniec 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.