Question
Create a Show class Constructor toString for one Show (in a row format) as demonstrated above get/set methods as needed Create a TicketMaster class that
Create a Show class
Constructor
toString for one Show (in a row format) as demonstrated above
get/set methods as needed
Create a TicketMaster class that has an ArrayList of Show objects
Constructor
toString that will return the display showing the entire ArrayList of Shows (as shown above)
Several helper methods. Create parameters as needed. Return type listed after method description.
Method to read in Show data (void)
Method to Search by City and display all Shows in that city (returns ArrayList of all Shows)
Sort by Performer (Selection sort) (void)
Sort by Price (Insertion sort) (void)
TicketMasterDriver
Show menu of choices and user selects a choice to sort A-Z, Z-A, sort by ticket price low - high or high-low, search by city, or quit.
If they dont enter a valid option 1-6, then they are prompted to enter a correct option (you are preventing bad user input and should use a try-catch block)
I should not be able to crash your program by entering bad input data
Use a while loop to allow the user to continually interact with the menu until they choose to quit
Create constants that are equal to the int values 1-6 so that your code is more readable rather than seeing the values 1-6 in your if statements
Other items
Your entire lab should only have ONE Scanner for the keyboard. If you need to use this Scanner in other methods, then pass it as a reference in a parameter.
When you are done using a Scanner object, close the Scanner
Use a try/catch block to avoid crashing the program
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