Can some one look at this for me. I am using bluej.
Thanks in advance ...
Write a program that will read the number of rows and columns of seats on a certain plane, and accept reservations for a certain flight on that plane. Use a two-dimensional array or vector to represent rows and columns in the plane.
Write a program that will read the number of rows and columns of seats on a certain plane, and accept reservations for a certain flight on that plane. The plane might have economic, business and first class sections.
Your program should do the following:
1. Prompt for and read the number of rows of seats on the plane (integer).
2. Prompt for and read the number of columns of seats on the plane (integer).
3. If number of rows or number of columns is zero or negative print:
Values must be positive ! and exit the program. (Catching Errors)
4. Read the number of rows in the economic section of the plane (integer). Note that the economic will always be at the rear of the plane.
5. If '0' is entered, then the person is in the first class section of the plane.
6. Display the following menu :
– Make a reservation – first class (f/F).
– Make a reservation – business class (b/B).
– Make a reservation – economic class (e/E).
– Quit (q/Q).
Please select an option :
1. Read user's choice and proceed as follows: When seats are reserved in a section and if there is one available, print the number of the seat reserved (row number and columns number).
Reserving seat – economic - row: 21 column: 01
If all seats in the economic section are reserved, print:
No more economic seats available.
Then display the menu again and prompt for another choice.
2. If user's choice is 'q' or 'Q':
– Total number of seats.
– Total number of seats reserved.
– Number of seats reserved in the first class section.
– Number of seats reserved in the business class section.
– Number of seats reserved in the Economic class section.
3. If user enters any other choice:
– Invalid choice !
– Then display the menu again and prompt for the next choice.
– Your program should, of course, never assign a seat that has already been assigned.