Question
In Java, Write a program to implement a theater seating chart. The seating chart should be implemented as a two-dimensional array of ticket prices. Start
In Java, Write a program to implement a theater seating chart. The seating chart should be implemented as a two-dimensional array of ticket prices. Start with the array as follows with these prices in dollars. The array should be initialized in the code without any outside files. 30 40 50 50 50 50 50 50 50 50 40 30 30 30 40 40 50 50 50 50 40 40 30 30 20 30 30 40 40 40 40 40 40 30 30 20 20 30 30 40 40 40 40 40 40 30 30 20 20 20 30 30 40 40 40 40 30 30 20 20 |
20 20 30 30 40 40 40 40 30 30 20 20 10 10 20 20 20 20 20 20 20 20 10 10 10 10 20 20 20 20 20 20 20 20 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 Allow the user to pick either a seat or a price or a display. Allow the user to enter s for seat, p for price, d for display, or q to quit. Mark sold seats by changing the price to 0. When a user specifies a seat, make sure it is available. When a user specifies a price, find any seat with that price. If the user asks for a display of the available seats, show something like what is shown above so they can see what seat they want to choose. The seat in the bottom left corner could be chosen by entering 1 1 at the command line. Provide a main method that shows the implementation of your theater seating program. You should allow the user to keep entering selections until he or she wants to quit. Make sure all instructions are clear so the user knows what to do next. The class name should be SeatingChart.java. The program should not crash no matter what is entered. Include Javadocs.
|
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