The class has three instance fields:
name, the name of the bookstore
tickets, an ArrayList<Ticket> storing Ticket objects
merchandise, an ArrayList<Merchandise> storing
getName() returns the name of the bookstore.
getTicketDates() returns an ArrayList<Date> of all the dates for which tickets are still available. If there are no tickets available, an empty list is returned.
getTickets (Date date) returns an integer indicating the number of tickets available for the specified date.
getTicket(long id) returns the Ticket that matches the specified id. If there is no Ticket matching the given id, null is returned.
getMerchandise()returns an ArrayList<Merchandise> of all the inventory (in-stock and ordered). This method must create a separate copy of the ArrayList before it returns the list. If there are no merchandise items in the AmusementPark, an empty list is returned.
getMerchandise(String category) returns a list of Merchandise objects whose category matches the specified category. For example, if called with “T-shirt” the method returns all Merchandise objects with the category “T-shirt” as a new list. This method must create a new copy of an ArrayList that stores all the matched Merchandise objects. If no items in the AmusementPark match the given name, an empty list is returned.
getMerchandise(long id) returns the merchandise item that matches the specified id. If there is no merchandise item matching the given id, null is returned.
addTicket(Ticket) adds a new Ticket to the inventory of the
addMerchandise(Merchandise) adds a new Merchandise to the inventory of the AmusementPark.
buyMerchandise(String id) removes a Merchandise object from the list of merchandise of the AmusementPark. If the id does not match any Merchandise object in the list, an exception is thrown.
buyTicket(String id) removes a Ticket object from the list of ticket items of the AmusementPark. If the id does not match any Ticket object in the list, an exception is thrown.
Design a tester class called AmusementParkTester. The tester class has a main() method and tests the functionality of the class AmusementPark as follows:
Create AmusementPark and name it “Walden Amusement Park”.
Create a minimum of three Ticket objects and add them to the bookstore.
Createatleast of eachcategory,and themtothe
< > up a loop to:
Display ashort that ato differentactions thegift such aslooking oror Use allof accessor the access Usethe given to purchases.
< > the user for a specific action.
Depending the action the forinput such astheof aorcategory,etc. touse main() tohandleeach separately.
Performthe action and such asthelist of the has thetoString() to display on the
< > the user for continued access to the AmusementParkprogram should handle input errors gracefully. For example, if a particular ticket is searched and not found, the program should display a message such as “Selected ticket not found.”
All createa newtocopy newlist.This loopsto accessfromthe instance fieldsand addingthemto the new
< > error handling is essential for this project.
Javadoc be used to and
< > project submission should have four files for this assignment:< > – The Ticket class,< > – The Merchandise class,< > – The AmusementPark class,< > – A driver program for testing your AmusementPark class
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.Read more
Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.Read more
Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.Read more
Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.Read more
By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.Read more
Let us help you get a good grade on your paper. Get professional help and free up your time for more important courses. Let us handle your;