Sale!

Amusement Park Programming Project solved

Original price was: $28.00.Current price is: $25.00.

Download Details:

  • Name: AmusementPark-3artgy.zip
  • Type: zip
  • Size: 13.36 KB

Category:

Description

5/5 - (5 votes)

Project Requirements
Your 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(booleannewStatus)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 severalinstancefields: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 amerchandiseitem.g.setPrice(double price)to change the price of the merchandise.h.setInstock(booleannewStatus)to change the status of themerchandiseitem.i.Accessor methods for all instance fields.j.toString()to return a neatly formatted string that contains all theinformation stored in the instance fields