Question: +5) Files > prog 2.doc prog 2.doc Download prog 2.doc (28 KB) COSC 211 Programming assignment 12 Write an interactive menu driven program in Java


+5) Files > prog 2.doc prog 2.doc Download prog 2.doc (28 KB) COSC 211 Programming assignment 12 Write an interactive menu driven program in Java to implement a seat reservation system for a passenger airplane. Assume a small plane with seat numberings as follows: 1 AB 2 AB 3 AB 4 AB 5 AB 6 AB 7 AB CD CD CD CD C D CD C D 7 ABCD The program should display the seat pattern, with an "X' marking the seats already assigned. For example, after the seats 1A, 28, and 4C are taken, the display should look like: 1 XB C D 2 AX CD 3 AB CD 4 AB XD 5 AB C D 6 AB CD 7 C D After displaying the seats available, the program should prompt for the seat desired, input the seat number typed by the user and then display the updated seat chart. This continues until all the seats are filled or until the user desires to quit. If the user types in a seat that is already assigned the program should say that the seat is occupied and ask for another choice. NOTE: The program must input a seat number as a string e.g. "3A","SC" etc. and then determine the row number and the column number of the array that needs to be accessed. Also, no spaces are allowed in the input seat number. Create a project named Project2 which contains a class named Program2 containing the main method for this application
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
