Past-paper question · 2016 May-June · Paper 32 · Q6(f)(ii)

Question 6(f)(ii) 2016 · May-June · Paper 32 · 25 marks

Question 6

Part (f)

(ii)

Question 6

<sentence> ::= <verbPhrase> | <sentence><nounPhrase>

Write the binary patterns for the largest and smallest positive number that can be represented with this 16-bit format for normalised real numbers.

Smallest

Largest

[2]

Question 12

5 A company stores customer data in a database using linked lists.

An array of records of data type CustomerNode implements a linked list of surnames.

The linked list stores the surnames in alphabetical order.

The CustomerNode record has two fields as defined below:

TYPE CustomerNode Surname : STRING Pointer : INTEGER ENDTYPE

The linked list is created using the array and variable shown below.

Identifier Data type Description

SurnameList ARRAY[1 : 10000] OF CustomerNode An array to store the surname and pointer values

HeadSurname INTEGER Stores the index position of the node at the head of the linked list

Part (a)

(i)

Explain the difference between a static data structure and a dynamic data structure.

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

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

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

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

[2]

(ii)

State a benefit gained from using a dynamic data structure to implement a linked list.

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

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

[1]

Question 13

The database initially contains the records of four customers. These have the surnames:

GREENE, HASAN, ALI and ABBOT.

The data are stored as shown below:

+HDG6XUQDPH

6XUQDPH/LVW 6XUQDPH 3RLQWHU 1 *5((1(

2 +$6$1

3 $/,

4 $%%27

: :

9999

100000

Part (b)

State the value of:

SurnameList[HeadSurname].Surname ...............................................................

SurnameList[3].Pointer ............................................................................

[2]

Part (c)

Complete the linked list diagram by adding the data and pointer values for each customer

node.

+HDG6XUQDPH

[3]

Question 14

Part (d)

A similar linked list is maintained by the database management software to organise

customers according to the money owed to the company (the balance). The data structure used is a second linked list. The pointer to the head of this linked list is HeadBalance.

+HDG%DODQFH 31

0 134

20 28

180 156

510 0

(ii)

Describe the method to locate the position in the linked list for inserting a new record.

Include how to change the pointer values.

Ignore the special case in which the linked list is empty so that the new record becomes the first record in the linked list. Do not write pseudocode or program code.

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

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

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

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

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

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

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

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

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

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

[4]

Question 15

Question 6 begins on page 16.

Question 16

Question 6

Part (a)

There are four key features that apply to most robots. They are:

  • mechanical devices
  • movable
  • able to sense their surroundings
  • controlled by a computer program

One application of the use of a robot is a paint sprayer on a car production line.

Explain how the four features listed above apply to this application.

The robot is a mechanical device.

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

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

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

It is movable.

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

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

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

It can sense its surroundings.

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

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

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

It is controlled by a computer program.

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

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

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

[4]

Question 17

Part (b)

Name two hardware components that would be found in the paint sprayer.

Explain how each hardware component is used in the operation of the robot.

1 ................................................................................................................................................

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

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

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

2 ................................................................................................................................................

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

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

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

[4]

Question 18

Reveal official mark-scheme answer

The answer for this question is in the official mark scheme: open the mark scheme.

Mark scheme 9691_s16_ms_32.pdf →

Topic relevance

Why this question appears here

91% 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 9691_s16_qp_32.pdf

Keep practising this topic