Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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!

Java, Programming

  • Category:- Java
  • Reference No.:- M92076715
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Java

Project requirementsfor the problem described in the next

Project requirements For the problem described in the next section, you must do the following: 1. include your student ID at the end of all filenames for all java code files. Three classes have been identified in section ...

Assignment - method in our madnessthe emphasis for this

Assignment - "Method in our Madness" The emphasis for this assignment is methods with parameters. In preparation for this assignment, create a folder called Assign_3 for the DrJava projects for the assignment. A Cityscap ...

Assessment instructionsin this assessment you will complete

Assessment Instructions In this assessment, you will complete the programming of two Java class methods in a console application that registers students for courses in a term of study. The application is written using th ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

Operating systems assignment -problem 1 sharing the bridgea

Operating Systems Assignment - Problem 1: Sharing the Bridge A new single lane bridge is constructed to connect the North Island of New Zealand to the South Island of New Zealand. Farmers from each island use the bridge ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

Object-oriented software development1 introduction 11

OBJECT-ORIENTED SOFTWARE DEVELOPMENT 1. Introduction 1.1 Assignment Requirement 1.2 Deliverables and Structure (what to submit) 1.3 Software Restrictions 1.4 How to score high... 1.5 Assumptions 2. System Requirements 2. ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

Can someone please help me with the following java

can someone please help me with the following java question The input is an N by N matrix of nonnegative integers. Each individual row is a decreasing sequence from left to right. Each individual column is a decreasing s ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As