Past-paper question · 2016 May-June · Paper 41 · Q4(b)

Question 4(b) 2016 · May-June · Paper 41 · 3 marks

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

Official answer for Question 4

Part (b)

Part (b)

✓
retestAllowed(ThisCar)

Question 3

Question 1

✓
If (testBrakes(ThisCar, pass) and testTyres(ThisCar, fail))

Question 1

✓
or (testBrakes(ThisCar, fail) and testTyres(ThisCar, pass))

Question 1

✓
(one mark per bold underlined all correct)

Mark scheme 9608_s16_ms_41.pdf →

Show text version of question

Question 4

Part (b)

Question 4

When a car reaches a certain age, a safety assessment has to be carried out. A car’s brakes and

tyres must be tested. The tyre test result and the brakes test result for each car are recorded. If the car passes the assessment, a safety certificate is issued.

Cars have a unique three-character registration.

The following knowledge base is used:

01 car(a05). 02 car(h04). 03 car(a03). 04 car(h07). 05 car(a23). 06 car(p05). 07 car(b04). 08 carRegYear(a05, 2015). 09 carRegYear(h04, 2013). 10 carRegYear(a03, 2008). 11 carRegYear(h07, 2011). 12 carRegYear(a23, 2008). 13 carRegYear(p05, 2014). 14 carRegYear(b04, 2014). 15 testBrakes(h07, pass). 16 testTyres(h07, fail). 17 testBrakes(a03, fail). 18 testTyres(a03, fail). 19 testBrakes(a23, pass). 20 testTyres(a23, pass). 21 carAssessmentDue if carRegYear(Car, RegYear) and RegYear <= DeadlineYear. 22 issueCertificate(Car) if testTyres(Car, Result) and testBrakes(Car, Result) and Result = pass.

Part (b)

If a car fails one of the two tests, a retest is allowed.

Write a new rule for this.

retestAllowed(..............................) if ............................................................................

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

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

Topic relevance

Why this question appears here

71% assigned-topic match · Programming › Constructs

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

Keep practising this topic