Past-paper question · 2015 May-June · Paper 32 · Q3(b)(i)

Question 3(b)(i) 2015 · May-June · Paper 32 · 5 marks

Original past-paper question for 3(B)(I)
Original past-paper question for 3(B)(I)
Original past-paper question for 3(B)(I)
Reveal official mark-scheme answer Official mark-scheme answer for 3(B)(I)

Official answer for Question 3

Part (b)

(i)

Part (b)

(i)

✓
TYPE LocationRainfall

Question 1

✓
DECLARE LocationName
✓
: STRING

Question 1

✓
DECLARE LocationHeight
✓
: INTEGER

Question 1

✓
DECLARE TotalMonthlyRainfall : ARRAY[1..12] OF REAL
✓
1 +1
✓
ENDTYPE

Mark scheme 9608_s15_ms_32.pdf →

Show text version of question

Question 3

Part (b)

(i)

Annual rainfall data from a number of locations are to be processed in a program.

The following data are to be stored:

  • location name
  • height above sea level (to the nearest metre)
  • total rainfall for each month of the year (centimetres to 1 decimal place)
A
user-defined, composite data type is needed. The programmer chooses

LocationRainfall as the name of this data type.

A
variable of this type can be used to store all the data for one particular location.

(i)

Write the definition for the data type LocationRainfall.

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

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

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

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

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

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

.......................................................................................................................................[5]

Topic relevance

Why this question appears here

92% 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_s15_qp_32.pdf

Keep practising this topic