Question: WRITE A JAVA PROGRAM Write a simple bus seat reservation program. The bus has 10 rows, with 4 seats in each row. The program should

WRITE A JAVA PROGRAM

WRITE A JAVA PROGRAM Write a simple bus seat reservation program. The

bus has 10 rows, with 4 seats in each row. The program

Write a simple bus seat reservation program. The bus has 10 rows, with 4 seats in each row. The program should perform the following: Step 1. The program should ask the user to enter what row and seat number to reserve. Indicate an X mark if the seat is reserved. Step 2. Repeat Step 1; the program will stop until the user enters a negative number. Compile and execute the program. Debug syntax and logical errors, if there are any in the program. Inform your instructor once you are done. The following is the example output: Bus Seat Reservation: Col 1 Row 1 Row 2 Row 3 * Row 4 I * Row 5 I* Row 6 I* Row 7 I* Row 8 Row 9 Row 10 I* Enter row and column number to reserve separated by space (Enter a negative number to exit): 43 Figure 1. First seat reservation sample output Col 2 Col 3 Col 4 Col 3 Col 4 Bus Seat Reservation: Col 1 Col 2 Row 1 I * Row 2 Row 3 Row 4 1 * Row 5 Row 6 Row 7 Row 8 Row 9 Row 10 Enter row and column number to reserve separated by space (Enter a negative number to exit): 4 4 Figure 2. Second seat reservation sample output Col 3 Col 4 Bus Seat Reservation: Col 1 Col 2 Row 1 I Row 2 Row 3 I* Row 4 1* Row 5 Row 6 Row 7 Rowa Row 9 1 Row 10 Enter row and column number to reserve separated by space (Enter a negative number to exit): -1 Program exit! Figure 3. Sample output of reserved seat and exit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!