Write an application to assign seats on the cinema theater?s only showroom (capacity: 10 seats).
Your application should display the following alternatives: Please type 1 for Twin Seat and Please type 2 for Normal Seat. If the user types 1, your application should assign a Twin Seat numbered from 1 to 5. If the user types 2, your application should assign a Normal Seat numbered from 6 to 10. Your application should then display a softcopy of the ticket indicating the person?s seat number and whether it is a Twin Seat or Normal Seat. It should also display the total number of Twin Seats and Normal Seats reserved.
Use a one-dimensional array of primitive type Boolean to represent the seating chart of the cinema theater. Initialize all the elements of the array to false to indicate that all the seats are empty. As each seat is assigned, set the corresponding elements of the array to true to indicate that the seat is no longer available. Your application should never assign a seat that has already been assigned. When the Twin Seat is full, your application should ask the person if it is acceptable to be assigned a Normal Seat (and vice versa). If yes, make the appropriate seat assignment. If no, display the message ?Next show in 3 hours time?.
Hints: ? Use an array of Booleans to represent the seats in the cinema theater. ? Use ints to keep track of the next available seat for each of the seat types.