Develop a cinema ticket booking application in java

Assignment Help JAVA Programming
Reference no: EM131322115

Assignment

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!

Reference no: EM131322115

Questions Cloud

Write a program that evaluates arithmetic expressions : CSE 231: Assignment on Stacks- Write a program that evaluates arithmetic expressions in infix notation that are not necessarily fully parenthesized. An arithmetic operation +, -, * or / has its usual precedence and associativity.
Why researchers use this minimum criterion for reliability : What is the minimum reliability coefficient that researchers consider acceptable? Why do researchers use this minimum criterion for reliability?
References to which variables exhibit temporal locality : How many 16-byte cache blocks are needed to store all 32-bit matrix elements being referenced?
How did china and japan differ in their paths to industry : What sorts of things did the US and USSR do in order to try to win the Cold War? Evaluate each country's strategies. Did the US do a good job? Did the USSR? What did each side do well, and what could each side have done better? Illustrate your poi..
Develop a cinema ticket booking application in java : 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
Why researchers sometimes not able to test the reliability : What value of Cronbach's alpha coefficient indicates acceptable interitem reliability?- Why are researchers sometimes not able to test the reliability of their measures?
Structure of understanding work : Explore the way that you have viewed the "social order." How does the structure of your understanding work? Give an example. Give an example or two of how a different paradigm challenges your understanding of the "social order."
Calculate the total number of bits required for the cache : Explain why the second cache, despite its larger data size, might provide slower performance than the first cache.
Gender dichotomy and hierarchy in our society : How is the gender dichotomy and hierarchy in our society, as discussed by Newman and the film, reinforced by societal institutions such as the paid labor force, religion, media and the family? Provide examples to illustrate your argument Be sure t..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd