OUTPUT "Please Enter The Number of Seats You Want To Book " INPUT Seats
OUTPUT "Please Enter The Number of Seats You Want To Book " INPUT Seats
(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.
...................................................................................................................................................
[2]
5 An algorithm has been written in pseudocode to check if a new password is in a list of previously
used passwords OldList[]
If the password is not found, the new password will be stored at the end of the list to replace
"XXXX" already stored there.
(a) Identify the three errors in the pseudocode and suggest corrections.
Error 1 .......................................................................................................................................
Correction .................................................................................................................................
...................................................................................................................................................
Error 2 .......................................................................................................................................
Correction .................................................................................................................................
...................................................................................................................................................
Error 3 .......................................................................................................................................
Correction .................................................................................................................................
...................................................................................................................................................
[3]
START
STOP
[6]
START
Accept 0
Reject 0
INPUT PartOK
No
IS PartOK Reject Reject + 1
= 'Y'?
Yes
Accept Accept + 1
No IS Accept
= 10 ?
Yes
Yes
IS Reject Error Reject/Accept * 100
> 1?
No
OUTPUT
"Too many rejected ",
OUTPUT Error, "% error"
"Success"
STOP
[5]
(b) Describe how the algorithm should be changed to accept ‘Y’ or ‘y’ for a successfully
manufactured part.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [3]