Past-paper question · 2016 May-June · Paper 33 · Q2(e)(ii)

Question 2(e)(ii) 2016 · May-June · Paper 33 · 3 marks

Original past-paper question for 2(E)(II)
Original past-paper question for 2(E)(II)
Original past-paper question for 2(E)(II)
Original past-paper question for 2(E)(II)
Reveal official mark-scheme answer Official mark-scheme answer for 2(E)(II)

Official answer for Question 2

Part (e)

(ii)

(ii)

MyStack.InitialiseStack

✓
(1)

Max[3]

✓
MyStack.Push("JH45")
✓
(1)
✓
MyStack.Push("HH90")
✓
(1)
✓
DeletedItem ← MyStack.Pop()
✓
(1)

Mark scheme 9691_s16_ms_33.pdf →

Show text version of question

Question 2

Part (e)

(ii)

It is suggested that the stack could be implemented using object-oriented programming.

A
programmer designs the following pseudocode for the class definition.

(ii)

The main program uses a variable MyStack as an instance of StackClass.

Write pseudocode statements that would carry out the following sequence:

  • initialise MyStack
  • add (push) to the stack "JH45" followed by "HH90"
  • remove an item (pop) from MyStack and assign the value to variable DeletedItem

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

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

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

.......................................................................................................................................[3]

Question 8

Topic relevance

Why this question appears here

98% assigned-topic match · Further programming › Programming paradigms

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_33.pdf

Keep practising this topic