Past-paper question · 2018 October-November · Paper 42 · Q4(c)

Question 4(c) 2018 · October-November · Paper 42 · 8 marks

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

Official answer for Question 4

Part (c)

Question 1

mark per bullet point to max 8:

Question 8

✓
•
✓
class declaration with inheritance from Performer
✓
•
✓
constructor taking five or six parameters
✓
•
✓
«call to inherited constructor «
✓
•
✓
«sending either five parameters or four with "Acrobat
✓
•
✓
UseFire declared as private Boolean
✓
•
✓
In constructor, storing value in UseFire from parameter
✓
•
✓
PerformerInfo header (and end where applicable) without any parameters
✓
•
✓
« outputs / returns
✓
•
✓
… StageName & " (real name " & FirstName & " " & SecondName & ") is an acrobat"
✓
•
✓
« "Fire is part of " & StageName & "’s act." ONLY printed when Fire is TRUE
✓
•
✓
« "When not performing, " & StageName & " is a " & SecondaryRole
✓
Example Python:
✓
class Acrobat(Performer):
✓
def __init__(self,Firstname, Lastname, Stagename, SecondaryRole, Fire):
✓
Performer.__init__(self, Firstname, Lastname, Stagename, SecondaryRole, "Acrobat")
✓
self.__UseFire = Fire
✓
def PerformerInfo(self):
✓
ReturnString = "%s (real name %s %s) is %s. " % (self. Stagename, self.Firstname,
✓
self. Lastname, Acrobat.PerfType)
✓
if(self.__UseFire):
✓
ReturnString = ReturnString + "Fire is part of %s's act. " % (self.Stagename)
✓
else:
✓
ReturnString = ReturnString + "Fire is not part of %s's act. " %
✓
(self.Stagename)
✓
ReturnString = ReturnString + "When not performing, %s is a %s" % (self.Stagename,
✓
self.SecondaryRole)
✓
return ReturnString
✓
9608/42
✓
Cambridge International AS/A Level – Mark Scheme
✓
October/November 2018
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 9608_w18_ms_42.pdf →

Show text version of question

Question 4

Part (c)

Question 4

A circus is made up of performers. There are three types of performer: clown, acrobat and aerial.

The following data are stored for each performer.

  • First name
  • Last name
  • Secondary role (that can be edited)
  • Stage name (that can be edited)
  • Type of performer (PerfType)

The following statements apply to performers.

  • An acrobat may or may not use fire in his or her act.
  • An aerial performer can be one of two types: either catcher or flyer.
  • Each clown has an item, such as a water-spraying flower or a unicycle.
  • Each clown also has a musical instrument, such as a guitar or an oboe.

Each of the three types of performer has a method that will display all of the information about that performer in a specific format. For example:

Sally Superstar (real name Sally Smith) is an acrobat. Fire is part of Sally Superstar’s act. When not performing, Sally Superstar is a set changer.

Part (c)

The program will display the acrobat information as follows:

Sally Superstar (real name Sally Smith) is an acrobat. Fire is part of Sally Superstar’s act. When not performing, Sally Superstar is a set changer.

Write program code for the Acrobat class.

Programming language ............................................................................................................

Program code

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Question 11

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

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

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

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

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

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

[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 9608_w18_qp_42.pdf

Keep practising this topic