Cinema Ticket Booking

Cinema Ticket Booking

you will individually develop a Cinema Ticket Booking Application in Java with the following functionality, available from the console:
Requests the Customer’s name, age and asks if they are a student

Lists films that are currently available to watch at the cinema

Asks the customer to select the film to watch from a menu

Issues a ticket if age appropriate

Calculates the cost of the ticket and prints the ticket details to the console with the customers details, the film’s detail and the cost 

Methodology and Marking Scheme:

You will develop five classes with the following instance variables and methods 

Film class

Stores the title of a film and the rating of the film

Has a constructor with inputs for film title and rating

Has a default constructor with suitable default values

Has appropriate data encapsulation methods

toString method returns a string representation of a Film object


Customer class

Stores the customer’s name, age, and if they are currently a student

Has a constructor with inputs for name, age and student

Has a default constructor with suitable default values

Has appropriate data encapsulation methods

toString method returns a string representation of a Customer object 

RATING enumerated type

Has elements corresponding to New Zealand’s film rating systems:

General, films appropriate for all ages o Parental Guidance, ages 12 and above o Mature, ages 16 and above

Has an instance variable storing the minimal age for the film rating

Has a constructor with input for minimal age
Ticket class

Stores a Customer object and Film object

Has a method double cost() which calculates ticket cost as follows:

Standard ticket for adults: (aged 18 years or more) $10

Standard tickets for children: (aged less than 18 years) $7

Students between the ages of 10\25 have a 15% discount of their ticket

Students above 25 have a 10% discount off their ticket

Seniors (above the age of 64) and are not students have a 7% discount from the cost of their ticket

Has a constructor with inputs for Customer and Film

Is immutable but has appropriate get methods

toString method returns a string representation of the printed ticket with details for customer and film and total cost, with correct decimal format for currency 

CinemaTicketBookingApplication class

static (e.g. class) variables for: keyboard input, a primitive array of Film objects and a constant NUMBER_OF_FILMS that specifies the size of the array

static main method initialises a primitive array of films (these may be hard\coded) and repeatedly issues tickets in the following manner:

invokes the method private static Customer customerDetailsInput() which prompts the user to enter their customer information, constructs and returns a Customer object

invokes the method private static Film filmSelection() prompting the user to type the number corresponding to the film they want to watch, returning the appropriate Film object

public static Ticket issueTicket(Customer aCustomer, Film aFilm) which constructs and returns a Ticket object if the customer’s age is appropriate to the film they wish to view. If not, null is returned and the  customer is advised that the purchase could not be completed.

The Ticket is issued (e.g. displayed to the console) and the customer is asked if they wish to purchase another ticket

Sample Usage of CinemaTicketBookingApplication:
Welcome to the Cinema Ticket Purchasing System Please enter your name:

Jack Smith

Please enter your age: 20

Are you a student? (Y/N) Y

Which film would you like to watch:

Ant-Man rating: (P)

Minions rating: (P)

Jurassic World rating: (M)

Inside Out rating: (G) 1

Your ticket is ready to be collected!
Powered by