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...


Java: Use array class. Thanks!


Write a simple bus seat reservation program. The bus has 10 rows, with 4 seats in each row. The<br>program should perform the following:<br>Step 1. The program should ask the user to enter what row and seat number to reserve. Indicate<br>an 'X' mark if the seat is reserved.<br>Step 2. Repeat Step 1; the program will stop until the user enters a negative number.<br>

Extracted text: 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.
Bus Seat Reservation:<br>Col 1<br>Col 2<br>Col 3<br>Col 4<br>Row 1<br>Row 2<br>Row 3<br>Row 4<br>Row 5<br>Row 6<br>Row 7<br>Row 8<br>Row 9<br>Row 10<br>Enter row and column number to reserve separated by space (Enter a negative number to exit): 4 4<br>Figure 2. Second seat reservation sample output<br>Bus Seat Reservation:<br>Col 1<br>Col 2<br>Col 3<br>Col 4<br>Row 1<br>Row 2<br>Row 3<br>Row 4<br>Row 5<br>Row 6<br>Row 7<br>Row 8<br>Row 9<br>Row 10<br>Enter row and column number to reserve separated by space (Enter a negative number to exit): -1<br>Program exit!<br>Figure 3. Sample output of reserved seat and exit<br>

Extracted text: Bus Seat Reservation: Col 1 Col 2 Col 3 Col 4 Row 1 Row 2 Row 3 Row 4 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 Bus Seat Reservation: Col 1 Col 2 Col 3 Col 4 Row 1 Row 2 Row 3 Row 4 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): -1 Program exit! Figure 3. Sample output of reserved seat and exit

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here