You will be designing a class that will represent the seatingchart for a theater like the EKU
Question:
You will be designing a class that will represent the seatingchart for a theater like the EKU Center for the Arts during theCOVID-19 Pandemic. The class contains a two-dimensional doublearray and a String variable as data members. This two-dimensionalarray is set to represent the seating chart and stores ticketpricing for each seat for the event. The String data member holdsthe event name. For the purpose of this assignment, we are assumingall rows of seats in the theater have the same number of seats.
The single constructor for the Theater class (as shown below)allows the array to be initialized to the size desired by the user,where parameter n represents the number of rows and parameter mrepresents the number of seats in one row of the theater. It alsouses a parameter e to set the eventName data member.
Create a NetBeans project named FirstnameLastnameHW2 whichcontains a single source code file that has a public classcontaining the main method and another class named Theater. TheTheater class cannot be public since I?m having you do all of yourwork in a single source code file to make grading easier. Use thecode on page 2 to start your Theater class. You can add to thisclass as you see fit when writing this program, although you shouldnot change the constructor or add other data members to the Theaterclass.
In your main method, you should first ask the user the size ofthe theater and the event name. Once the user has answered, theuser should be presented with a menu so they can do thefollowing:
1. Allow the user to populate the seating chart with seatpricing for the event. You can assume seat prices are the same foran entire row of seats.
2. Allow the user to find seats by seat number (row and colnumber) to check if they are available for purchase.
3. Allow the user to find available seats by price. The usershould be told all seats available for the price they specify.
4. Allow the user to purchase up to 6 tickets in a singletransaction. When the user picks this option, they should be askedhow many tickets they want to purchase and then asked which seatsthey want to purchase. Your code should mark the seats as soldseats in the array by changing the price to 0.
Also due to COVID-19 restrictions to enforce social distancingmandates when tickets are sold, the seats purchased must betogether in a single row and the two seats immediately on eitherside of the seats sold must be marked as unavailable by settingtheir price to -1. Additionally, we can sell no more than half ofour seats to limit overall capacity.
You do not have to worry about collecting money. Assume themoney is collected outside the system. Your program should justmark the seats as sold in the array as described.
5. Print the seating chart showing available seats as a letterO, seats left empty for social distancing as U, and sold seats withan X.
6. Exit
Financial Management for Public Health and Not for Profit Organizations
ISBN: 978-0132805667
4th edition
Authors: Steven A. Finkler, Thad Calabrese