Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. GivenaclassnamedTicketDB, whichwillbeusedtoprovidetheresponsibilityofdata management of a set of Ticket objects. Internally, it should use an Arraylist of Ticket as follows: Public class TicketDB { private
1. GivenaclassnamedTicketDB, whichwillbeusedtoprovidetheresponsibilityofdata management of a set of Ticket objects. Internally, it should use an Arraylist of Ticket as follows: Public class TicketDB \{ private ArrayList ticket List = new ArrayList ( ); - implementation for a method to add a not null Ticket object into the ticketlist. - implementation for a method to report the average price of the tickets. - implementation for a method to retrieve a specific ticket by id. - implementation for a safe way method to obtain an Array List of all the Ticket objects within a given range of prices. - implementation for a method called reportTickets() which should write the Ticket objects stored in the ticketList to a text file named "tickets-report.txt". You should use the printf() method to format your data in the following structure: public void reportTickets ()
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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