Question: A bus has 28 seats, arranged in 7 rows and 4 columns: This seating arrangement is mapped, row-wise, to a 1D-array of size 28:

A bus has 28 seats, arranged in 7 rows and 4 columns: This seating arrangement is mapped, row-wise, to a 1D-array of size 28: 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 Implement a well-structured Java program to enable a user to make and cancel seat reservations for the bus. The program uses Array to store the reservation information: 0 indicates that a seat is not reserved, and 1 indicates that a seat is reserved. Originally all seats are not reserved: 0000 0000 0000 0000 0000 0000 0000 Your program starts by initializing a 1D-array. It must then display the following menu: 1. Display number of available seats. 2. Display seat status for all seats. 3. Reserve seat(s). 4. Delete reservation(s). 5. Exit. Note: . . . Your project must not use 2D-array s or Strings. You must use meaningful variable names and proper indentation in your program. You must not share code with another student. Doing so will result in a zero grade for all students involved. The project you submit must be your own work and not copied from other sources. Doing so will result in a zero grade.
Step by Step Solution
There are 3 Steps involved in it
Java code import javautil class solution public static void mainString args create an array with size 28 to store bus seats status int seats new int28 ... View full answer
Get step-by-step solutions from verified subject matter experts
