Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java please :) Use this with the code please Rainbow Cinemas is an upcoming multiplex in the city with a seating capacity of 400 people.

Java please :) image text in transcribed
image text in transcribed
image text in transcribed
Use this with the code please
image text in transcribed
Rainbow Cinemas is an upcoming multiplex in the city with a seating capacity of 400 people. They need an application to be developed for booking of tickets. You need to implement a Booking class based on the class diagram and description given below. Booking o customerEmail: String o seatsRequired int isBooked:boolean - seatsAvailable in Booking customer Email String seatsRequired int) .getCustomerEmail) String setCustomerEmail(customerEmail: String)void getSeatsRequired int seteatRequired(veatsequited int). vold onlooked): boolean looked Booked boolean) void getSeat Available in sut Seats Available at talable in void Method Description Booking(String customerEmail, int seatsRequired) Initialize the customerEmail and seatsRequired instance variable appropriately with the values passed to the constructor If the required number of seats are available, set the value of isBooked to true and update the value of seatsAvailable accordingly. The total number of seats available is 400 and should be initialized in static block. If the required number of seats are not available, set the value of isBooked to false. Implement the appropriate getter and setter methods. Test the functionalities using the provided Tester class. Create two or more Booking objects and validate that the values of the member variables are proper. 6- 9 1. class Booking 2 // Implement your code here 3 } 4 5-class Tester public static void main(String[] args) { 7 Booking bookingi - new Booking("jack@email.com, 100); Booking booking2 new Booking("1111email.com, 350); 10 Create more objects and see them to the bookings array for testing your code 11 12 Booking[] bookings = { booking, booking2 ); for (Booking booking bookings) if (booking, isBooked()) 16 System.out.printin booking.getSeatsRequired()*sents successfully booked for booking.getCustomer 103 17 1 16 - 10 System.out.println(norry booking.getCustomer to required number of seats are not satte 20 System.out.println("seots available Booking.setSeatsAvailable()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions