Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Arrays Objective: At the end of the exercise, the students should be able to Create arrays in a program, Access array elements: Perform array operations
Arrays Objective: At the end of the exercise, the students should be able to Create arrays in a program, Access array elements: Perform array operations and Use the Array class. Materials: NetBeans IDE 82 Java Development Kit (JDK) 8 Instructions: 1. Create a folder named LastName_FirstName (ex. Diaz_Jess) on your local drive. 2. Using NetBeans IDE, create a new project. 3. Name the class as SeatReservation and save the project in your folder 4. 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. 5. Compile and execute the program. 6. Debug syntax and logical errors, if there are any in the program 7. Inform your instructor once you are done. 8. The following is the example output: Bus Buat Reservation col 1 cal 2 col 3 BOU 1 Row 2 1. RON 3 14 RON 4 1 Rous 1 Ruw & 1 Bow 7 14 Bow & BOU9 1. Bow 10 1 Enter tow and columubor to reserve separated by space Enter a negative number to exit): 43 Figure 1. First seat reservation sample output cala 1 Bus Seat Reservation Cal 1 col 2 Col 3 Col 4 Row 1 Now 2 1. ROW 3 1 Row 1 1. Rous 1 Row 6 Row 1 BOS Row 9 1. Row 10 1 Enter row and colvan auber to reserve separated by space Enter a negative number to oxit) 44 Figure 2. Second seat reservation sample output Bus Seat Reservation: Col 1 Col 2 Col Col4 Row 1 1 Row 2 Row 3 1 Row 4 1. ROWS 19 RON 6 19 Row 1 Rov Rov 9 1 RM 10 11 Enter row and column sumber ta ut suparated by spacu (Entur mugative number to exit): -1 Prag a xit: Figure 3. Sample output of reserved seat and excit
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started