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

  Prompts the user to input a decimal number

Write a program that prompts the user to input a decimal number and ouputs the number rounded to the nearest integer.

  Write a public static method writetokenstolines

Write a public static method called writeTokensToLines that will read an input file one token at a time using Scanner, and write the tokens to a file using a PrintWriter, one token per line, with the tokens numbered starting at 1.

  Write thejava code for a program

Write theJava code for a program that reads the weight of a piece of luggage and print the proper message, depending on the weight, as per the table below.

  Create a class called numberset

You need to create a class called NumberSet.  It needs an empty default constructor and an overloaded constructor that takes an integer argument and creates a vector with that many random numbers in it.  So... if I created

  Application that prompts the user to make choice for coffee

Create a UseTVShow.java file that prompts the user to input up to 5 TV shows and stores the data in an array of objects first, then displays them as a list.

  Integer elements from an array

Suppose this same system has a TLB (Translation Lookaside Buffer) with 32 entries. Furthermore, suppose that a program contains instructions that fit into one page and it sequentially reads long integer elements from an array that spans thou- sand..

  A jsp expression can contain any java expression

A JSP expression can contain any Java expression that evaluates to a

  Write a function named getaddress

Write a function named getTelNums that accepts an argument of type person and returns a string of telephone numbers for that person. getTelNums(p) => "212.555.1234 646.555.4567 541.502.1212 541.406.8765"

  Creates a temporary array as part of merging

The textbook's Sorts.java merge() method creates a temporary array as part of merging, which is wasteful of computer memory. An alternative would be to store data to be sorted in a linked list rather than an array and to merge "in place" within th..

  Part-2write a program that will perform some of the basic

part-2write a program that will perform some of the basic tasks accomplished by a file integrity checker such as

  Write down a java program that implements a stack of

write a java program which implements a stack of integers. an integer should only be pushed into the stack if it is

  Write down the java code for the bank

Write down the java code for the bank of Fraud. User is presented with menu which looks something like this: 1. Deposit 2. Withdrawal 3. Check Balance 4. Exit.

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