Computer Science (AS & A Level) · May / June 2024 · Paper 43 · Question 2
9618
As printed in the paper
The question as text
A computer program will store data about trees. The user can enter their requirements for a tree and a suitable tree will be selected. The program is written using object‑oriented programming. The class Tree stores data about the trees. Tree TreeName : STRING HeightGrowth : INTEGER MaxHeight : INTEGER MaxWidth : INTEGER Evergreen : STRING stores the name of the tree stores the number of cm the tree will grow each year stores the maximum height in cm that the tree will grow stores the maximum width in cm that the tree will grow stores whether the tree keeps its leaves as "Yes", or loses its leaves as "No" Constructor() GetTreeName() GetGrowth() GetMaxHeight() GetMaxWidth() GetEvergreen() initialises TreeName, HeightGrowth, MaxHeight, MaxWidth and Evergreen to its parameter values returns the name of the tree returns the number of cm the tree will grow each year returns the maximum height in cm that the tree will grow returns the maximum width in cm that the tree will grow returns whether the tree keeps its leaves or loses its leaves
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)[7]
2(c)[4]
2(d)(i)[2]
2(d)(ii)[1]
2(e)(i)[6]
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.

