Computer Science (AS & A Level) · Oct / Nov 2024 · Paper 43 · Question 2
9618
As printed in the paper
The question as text
A computer program is designed to simulate horses doing show jumping. In show jumping, horses jump over obstacles called fences. A horse successfully jumps a fence if it does not knock the fence down. The program is written using Object-Oriented Programming (OOP). The class Horse stores data about the horses. Horse Name : STRING MaxFenceHeight : INTEGER PercentageSuccess : INTEGER stores the name given to the horse stores the maximum height in cm that the horse can jump, for example 132 stores the percentage chance of a horse not knocking down a fence, for example 70 represents a 70% chance of jumping a fence successfully Constructor() GetName() GetMaxFenceHeight() Success() initialises Name, MaxFenceHeight and PercentageSuccess to its parameter values returns the name of the horse returns the maximum height the horse can jump calculates and returns the percentage chance of a horse successfully jumping a specific fence
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
2(a)(i)[4]
2(a)(ii)[3]
2(b)(i)[5]
2(b)(ii)[1]
2(c)(i)[4]
2(c)(ii)[5]
2(d)[5]
2(e)(i)[3]
2(e)(ii)[2]
2(e)(iii)[2]
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

