A programmer is writing a data entry program for booking theatre seats. The programmer needs the program to accept only whole numbers that are greater than or equal to one and less than or equal to six.
- (a)Give the names of two validation checks that are required for this program. 1 2[2]
- (b)Complete this pseudocode to perform your two validation checks, using your answers given in (a): OUTPUT "Please enter the number of seats you want to book " INPUT Seats[5]
- (c)Give one item of test data to use when testing this program. State the reason for your choice of test data. Test data Reason for choice[2]
Mark scheme
Marking points from the official mark scheme (Oct/Nov 2023). The mark or mark type is shown in brackets.
- [2] One mark for each point type check range check
- [5] One mark for each point (max five) use of loop for check checking for whole number checking for number greater than or equal to one ... and less than or equal to six Appropriate error/reinput message ability to reinput value Example: WHILE Seats < 1 OR Seats > 6 OR Seats <> ROUND(Seats, 0) DO OUTPUT "Please enter a valid number of seats " INPUT Seats ENDWHILE
- [2] One mark for correct test data, one mark for corresponding reason Example: 7, abnormal data to show that this value would be rejected
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →