Amusement Park Programming Project solution

$29.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (5 votes)

Project Outcomes1. Use the Java selection constructs (ifandif else).2. Use the Java iteration constructs (while,do,for).3. Use Boolean variables and expressions to control iterations.4. Use arrays orArrayListfor storing objects.5. Proper design techniques.Project RequirementsYour job is to implement a simple amusement park information system thatkeeps track of admission tickets and merchandise in the gift shop. Theinformation system consists of three classes including a class to model tickets, aclass to model gift shop merchandise, the amusement park, and the amusementpark tester. The gift shop supports access to specific merchandise in the park’sgift shop and to purchase the merchandise or to order new merchandise for thegift shop. The UML diagram for each class (except the tester class) is givenbelow.1) Develop a simple class that models admission tickets. Each admission isdescribed by several instance fields:a. A ticket number as a long integer to identify the unique ticket,b. A ticket category represented as a String to store the category of theticket (i.e. adult, child, senior),c. A ticket holder represented as a String to store the name of the personwho purchased the ticket,d. A date represented as a Date to store the admission date for the ticket,e. A price represented as a double to store the price of the ticket,f. A purchase status represented as a boolean to indicate if the ticket hasbeen purchased (or is reserved)

In addition to these fields, the class has the following constructors andmethods:a. A parameterized constructor that initializes the attributes of a ticket.b.setPrice(double price)to change the price of a textbook.c.changePurchaseStatus(boolean newStatus)to change thepurchase status of the ticket.d. Accessor methods for all instance fields.e.toString()to return a neatly formatted string that contains all theinformation stored in the instance fields.2) Develop a simple class that models merchandise available in the gift shopsuch as t-shirts, sweatshirts, and stuffed animals. The class has severalinstance fields:a. An ID as a long integer to identify the specific merchandise item,b. A category as a String to store the specific type of merchandise,c. A description as a String to store the description of the merchandise,d. A price represented as a double to store the price of the merchandise,e. An instock as a boolean to indicate if the merchandise is instock or on-order.Valid values for category include “T-Shirt”, “Sweatshirt”, and “Stuffed Animal”,as well as any additional category you choose to support. If invalid values areentered, an error message must be printed and the category instance fieldmust be set to “UNKNOWN”.In addition to these attributes, the class has the following constructors andmethods:f. A parameterized constructor that initializes the attributes of amerchandise item.g.setPrice(double price)to change the price of the merchandise.h.setInstock(boolean newStatus)to change the status of themerchandise item.i.Accessor methods for all instance fields.j.toString()to return a neatly formatted string that contains all theinformation stored in the instance fields