In: Computer Science
Minor Cineplex
The Minor Cineplex is a local cinema in Neverland that has operated since 1989. It started off with only 1 theatre. Since then, the business has expanded and there are now 4 theatres. Minor Cineplex shows the same movie in every theatre. There are 20 seats in each row in all theatres.
Theatre 1, 2 and 3 have the same seating arrangements and ticket pricing scheme. Each theatre has 200 seats (i.e., 10 rows) divided equally in 2 sections: Front and Back. The ticket price is 250 Baht for the front section and 350 Baht for the back section.
Theatre 4 has only 100 premium seats in 5 rows. Ticket price is 500 Baht for all seats in row 1 to 4. The ticket price in row 5 is 700 Baht.
We are building a ticket selling system for Minor Cineplex. Note that we will only focus on building data models for each theatre and calculate the amount of tickets sold. You can assume that Minor Cineplex only sells tickets for the upcoming showtime (i.e., no advanced booking is allowed).
Design a system for Minor Cineplex so that it allows the box office staff to view and edit the movie title currently in theatres. It must allow the staff book a seat in the specified theatre (if available). The staff must be able to view the amount of tickets sold in the specified theatre as well as the total amount of tickets sold in all theatres.
Here are some design considerations:
Your program should provide the following menu.
Book a seat: The staff has to enter the theatre number along with the seat information to be booked (which includes the row and the seat numbers). The staff can only book one seat at a time. A confirmation message must be shown, if the booking is successful. A staff should be notified with a different message, if the seat is already taken.
Edit movie title: Minor Cineplex’s current policy is to show the same movie in all of its theatres. Note that this policy may be changed in the future.
View sales report: The sales report must show the movie title, the number of tickets sold and the sales amount (THB) for each theatre. The report must also show the total number of tickets sold and the sales amount (THB) in all theatres.
YOUR PROGRAM SHOULD BE IMPLEMENTED USING JAVA PROGRAMMING!!
code :
public enum SeatStatus {
SEAT_BOOKED,
SEAT_NOT_BOOKED;
}
public enum MovieStatus {
Movie_Available,
Movie_NotAvailable;
}
public enum SeatType {
NORMAL,
EXECUTIVE,
PREMIUM,
VIP;
}
class Movie {
int movieId;
int theaterId;
MovieType movieType;
MovieStatus movieStatus;
}
class Theater {
int theaterId;
String theaterName;
Adress adress;
List<Movie> movies;
float rating;
}
class Booking {
int bookingId;
int userId;
int movieId;
List<Movie> bookedSeats;
int amount;
PaymentStatus status_of_payment;
Date booked_date;
Time movie_timing;
}
Class SeatBook
{
Transaction transaction_obj;
bool seats[total_seats];
String place;
String ticketType;
bool check_availability();
int position_of_seat()
{
return seat_pos_in_theator;
}
void multiple tickets();
void final_booking()
{
place = positon_of_seat();
if (single_ticket)
continue;
else
mutliple_ticket_booking();
Transaction_obj.pay(ticketType, seats_booked, place);
}
}