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

  Write a java program for the search the given position

Write a Java Program for the Generate 100000 positive numbers between (0,150), Search the position of the first "58" in the array and Count how many "58" in the array.

  Write a program that asks for purchase price

Write a program that asks for purchase price and to calculate, state sales tax, county sales tax and then display purchase price, both sales tax amount and then the total.

  Method that receives an array and returns with no duplicate

Write a program that contrains a method that receives an array and returns a new array with no duplicates.

  Integrate ibm watson tool into your software

Integrate IBM Watson tool into your software. Extract both Personality Insights and Tone analyzer form the data set. Initial thoughts on how to represent/model the output for the next stage.

  Calculates the price of carpeting for rectangular rooms.

Once you have written these classes, use them in an application that asks the user to enter the dimensions of a room and the price per square foot of the desired carpeting. The application should display the total cost of the carpet.

  Write a program in java that simulates a simple line editor

Write a program in Java that simulates a simple line editor which supports the following operations

  Write a new queue method called movetorear

Write a new queue method called moveToRear() that moves the element currently at the front of the queue to the rear of the queue. The element that was second in line will be the new front element. Do this using methods q.enqueue() and q.dequeue()

  Design and develop a console application

Required to design and develop a console (text-based) application for a small car servicing company -

  Display all users and their addresses and phone numbers

Display all users and their addresses and phone numbers"); Display all orders in the system and the associated user's firstName, lastName and email");

  Create a class rectangle with attributes length and width

Create a class Rectangle with attributes length and width, each of which defaults to 1. Provide methods that calculate the rectangle's perimeter and area

  Afterwards a way for the user to input

And so on and so forth then afterwards a way for the user to input that they finished a particular task on the list. After the user has input that they have finished a particular task the program should be print "Good Job!" or "Keep it up!"

  Collection of scores (type int) for the last exam i

After being given a collection of scores (type int) for the last exam in your computer course, you are to computer the average of the scores and assign grades (O, S, U i.e. Outstanding, Satisfactory, Unsatisfactory)) to each student according to the ..

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