Past-paper question · 2018 May-June · Paper 32 · Q1(c)(i)

Question 1(c)(i) 2018 · May-June · Paper 32 · 4 marks

Original past-paper question for 1(C)(I)
Original past-paper question for 1(C)(I)
Original past-paper question for 1(C)(I)
Reveal official mark-scheme answer Official mark-scheme answer for 1(C)(I)

Official answer for Question 1

Part (c)

(i)

Question 1

mark per bullet

Question 4

✓
•
✓
Type declaration TYPE and ENDTYPE
✓
•
✓
Declaring Code as STRING
✓
•
✓
Declaring Mark as ARRAY [1:6] OF INTEGER
✓
•
✓
AverageMark as REAL
✓
For example:
✓
TYPE StudentAssessment
✓
DECLARE Code
✓
: STRING
✓
DECLARE Mark
✓
: ARRAY[1:6] OF INTEGER
✓
DECLARE AverageMark : REAL
✓
ENDTYPE

Mark scheme 9608_s18_ms_32.pdf →

Show text version of question

Question 1

Part (c)

(i)

Question 1

Data types can be defined in a programming language.

The data type, StudentRecord, is defined by the code:

TYPE StudentRecord DECLARE StudentID : INTEGER DECLARE StudentFirstName : STRING DECLARE StudentSurname : STRING DECLARE StudentDOB : DATE DECLARE StudentCourse : ARRAY[1:10] OF STRING ENDTYPE

A
variable, CollegeStudent, is declared with the code:

DECLARE CollegeStudent : StudentRecord

A
programmer is asked to write a program to process the assessment data for each student.

Students sit one exam in every course they take.

A
composite data type, StudentAssessment, needs to be defined with the following three

fields.

  • a student assessment code (a unique code of three letters and two digits)
  • the marks for the six exams
  • the average mark of the six exams

(i)

Write pseudocode to define the data type StudentAssessment.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

.......................................................................................................................................[4]

Topic relevance

Why this question appears here

85% assigned-topic match · Data types and structures › Data types and records

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 9608_s18_qp_32.pdf

Keep practising this topic