You are a programmer working in a software development company servicing mostly SME clients. You just received a new project to write a program that can be used to assign and book seats for a commercial cinema.
The cinema has 16 rows, with 20 seats in each row. The seats at the mid-column (number 5 to 15) of the last 2 rows closest to the doors (row A and B) are Twin seats, which will be sold in pair, side by side (e.g., buy A5 means paying for both A5 and A6). The rest of the seats in the row A and B, and all seats in row C to F are Premiere seats. Row G to L are Gold seats, and row M to Z are Economy seats. The map of the cinema is shown in Figure 1. The prices of the seats are shown in Table 1. See image. Seat pricing, see image.
Write a program that can be used to assign seats for the cinema. The following briefly describes the Seat Assignment function of such program. Initially, your program prompts the seating plan to the operator in the following format: See image.
Here, * indicates that the seat is available; x indicates that the seat is unavailable (sold out); o indicates that the seat is reserved (without payment). Your program prompts the operator to enter the following information:
Upon entering the information, the program is to list the available seats matched with the requirements. The list contains the available seats located side by side, in the same row and column that will meet the number of seat required. The list is shown with the starting seat number and the number of seat available after the seat. The operator can then choose to update the status of the seat. For example, See image.
Your program then output the seating plan to the operator with updated information, as shown in the following. See image.
If there is no available seat in a row to match the required number of seat, the operator should break down the number to 2 smaller numbers so that customers are to be seated in separate rows.
After some time you might have this output in the seating plan: See image.
Your program will output as the following: See image.
Notice the changes in the seating plan and the number of seats available. However, there is no payment received for the reserved seats and hence no change in the total sales value. The reserved seats will be changed into unavailable after payments are received.
Your program will block any attempt to change unavailable seats into reserved or available seat status.
The above described only the functions of your program under the Seat Assignment menu. The complete program should be menu-driven with the following choices:
With the Payment menu available, your program will allow the operator to change the reserved seats to available seats, considering all reserved seats will expired eventually if payment is not received after some time.
Your project 1 and 2 for TCP1231 are to write a program for the problem above. You are to make 2 submissions (one for Project 1 and one for Project 2) of your program according to the deadlines, each meeting the minimum requirements as described below.
The evaluations of the projects are based on the marking schemes and are attached with this document. Note: Both Project 1 and Project 2 can be individual or group projects. Maximum 2 person per group from the same tutorial session is allowed.
You are to write a program for only the seat assignment menu described above. You need to utilise all the programming techniques covered by the lectures, tutorials and labs up to week 7.
You will only program for the Seat Assignment function. Your program will:
You are to write a complete program for the cinema described above, including and not limited to:
You need to utilise all the programming techniques covered by the lectures, tutorials and labs up to week 11.
You are free to provide extra features of your choice in your program for extra marks. Some of them are as following: