You need to create an app that achieves the described functionality (listed later) for the following scenario:
Your app will be used by the staff who work for a cinema, e.g. HOYTS.
The cinema has a range of movie sessions each day.
Customers can book to attend a movie session, and if their circumstances change they can cancel their booking at a later time.
They want you to make an app that can be used to store the booking information and the customer details of the people attending a movie session.
The “Requirements” listed below will help to explain what functionality the app needs to achieve.
If you feel you cannot achieve a particular feature, then please try the other features and then come back to it.
To get full marks you will need to ensure that you have made use of each of the following components or constructs somewhere in your app:
• a Notifier
• a Spinner or ListView (or both)
• a CheckBox
• A Clock and instants
• HorizontalArrangement or TableArrangement (or both)
• a TinyDB component to gain access to persistent data stored in a database.
• the list construct
• a repetition construct
• a decision construct
• a boolean (AND or OR) expression.
• Procedures you have defined using the ‘to do’ or ‘to do … result’ blocks.
Level 1 – Compulsory Tasks
I expect all students should be able to complete all the requirements in Level 1. By completing these requirements, you should get a ‘pass’ grade for the assignment, provided you have done things the correct and intended way.
Requirement 1: There must be a welcome screen
This screen should be the first one presented to the user when they start your app – thus it needs to be done on “Screen1”. The screen needs to have mechanisms to get to the various other functions that are offered by the app.
Requirement 2: Obtain information about a customer
It must be possible to enter the details of a new customer into the app. The customer might make several bookings for different movie sessions, or only a single movie session. However, before they can book to attend a movie session, their details need to be input into the app.
The following details need to be input:
• A 5 digit customer ID that does not start with zeros (e.g. 10000 is the smallest acceptable value).
• The name of the customer
• The customer’s date of birth
• Whether the customer has a concession card.
There must be a specific screen where the user will enter this information. After validating the input, the screen should pass the inputted information to the prior screen (the screen we were at before we came to this screen for input). This screen should not store the information anywhere – it must return the information to Screen1.
Requirement 3: Let customers book a seat at a movie session
For this assignment, let us assume that each movie theatre has only 5 seats – this will make it easier for you to think about.
To start solving this requirement, assume that there is just one movie: Toy Story at 8pm on Sunday. (See Level 2 requirements for allowing other movies).
When the staff user chooses to book a passenger, the app should show the movie session details (the movie title and time). It should ask which seat to give to the customer. It should provide a way to choose one of the existing customers that have been entered into the app and to record the booking as being for that person. We need to make sure that the person has not already booked a space at this movie session – they can only book once for each movie session!
For example, pretend that these are the customers already entered in to the system by requirement 2:
• Gary Martin
• Sarah Smith
If Gary has already booked seat #3 in the movie theatre, then he cannot book any of the other 4 seats. If Sarah has not booked any seat yet (but Gary has booked seat #3), then she can book either seat 1, 2, 4 or 5. When all the details have been provided about who is making the booking, and which seat they want to book, then there must be a way to confirm the booking
– to tell the app to store the booking so that we know from now onwards, that the customer has booked that seat in the movie theatre for that session.
We do not want to be entering the customer’s personal details here. Requirement 2 is where the customer’s personal details are entered. So you must make sure that the customer who wants to make a booking has already been entered into the app before we come here to make the booking.
NOTE: If there are no seats available in the theatre for a movie session, you should warn the user so that they do not try to give a seat to a customer.
Requirement 4: Allow customers to cancel a booking
A customer is allowed to cancel their booking. You need to provide a way in the app for removing the customer’s booking – the seat in the movie theatre will become available to any customer (including the same customer if they choose to book a seat in the future).
Requirement 5: Show summary information about a movie session
There must be a screen which will display summary information about a movie session. It needs to tell the user the following things:
• The name of the movie being played.
• The time that the movie will be played.
• The number of people booked to see the movie.
• The number of seats that are available to book.
• The number of people with a concession card who are attending this session.
• The number of children who are attending this session (e.g. customers who are under 18 years old).
Requirement 6: Information about customers details, must persist between separate uses of the app
The details about customers from requirement 2, should only ever need to be entered once. If I enter Gary Martin’s details today, close the app, restart the phone tomorrow, and start the app Gary Martin’s details should still be known to the app – we should still be able to book a seat on a flight for Gary Martin.
You should use TinyDB to achieve this. Do not use a File.
Requirement 7: Information about customers and their bookings must persist between separate uses of the app
The details of all the bookings, made during requirement 3, and possibly changed by requirement 4, need to persist. For example, if today I book Gary Martin and Sarah Smith to attend the movie, close the app, restart my phone tomorrow and restart the app, they should both still have bookings for the same seats as today. If Sarah Smith cancels her seat tomorrow, then when I start the app the day after tomorrow, it should still show that Gary Martin has his seat booked, but Sarah Smith’s seat should be available. You should use a File for this. Do not use a TinyDB