2. When a new booking is recorded, the details are entered into a program to validate the
values. The following criteria are checked:
• firstName and surname are not empty
• room is either “basic” or “premium”
• nights is between 1 and 5 (inclusive).
If any invalid data is found “NOT ALLOWED” is displayed.
If all data is valid “ALLOWED” is displayed.
Complete the following program to validate the inputs.
You must use either:
• OCR Exam Reference Language, or
• a high-level programming language that you have studied.
[5]