Question 2(b) 2013 · May-June · Paper 21 · 20 marks
Reveal official mark-scheme answer

Official answer for Question 2
Part (b)
Part (b)
Question 21
Show text version of question
Question 2
Part (b)
Question 2
One way of storing her data will be to use a file of records.
Each record will contain at least the following data:
Data Identifier Description of input data
subject Subject Name of the subject, for example Physics
title Title Title of assignment
date set DateSet Format DDMMYYYY
hand-in date HandInDate Format DDMMYYYY
marked? IsMarked Y or N
date returned DateReturned Format DDMMYYYY
mark Mark Range 0 to 100
Part (b)
(i)
Each record needs another field to uniquely identify that record.
State an appropriate identifier for this field and state a suitable data type for it.
Question 3
(ii)
In a programming language write the declaration for the record structure, giving it For
the identifier Assignment. Examiner's Use
Programming language
Declaration
(iii)
State the number of bytes needed to store a value in the field IsMarked.
Part (c)
Describe what the function EOF() does when used in a program.
Question 4
Part (d)
Meena creates a sequential file, MyAssignments, of Assignment records. For
Examiner's Use Using pseudocode write the algorithm to search this file for the first Physics assignment.
OPENFILE MyAssignments FOR OUTPUT
CLOSEFILE MyAssignments
Question 5
2 The data for each record is validated as it is entered. For Examiner's Use
Part (b)
The data input for HandInDate also needs validating.
It will be entered as DDMMYYYY.
- DD must be less than 32 and greater than 0
- MM must be less than 13 and greater than 0
- YYYY must be greater than 2012 and less than 2015
Draw a flowchart that shows the logic to validate the hand-in date.
Question 6
Why this question appears here
72% assigned-topic match · Algorithm design and problem-solving › Algorithms
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9691_s13_qp_21.pdf
