Computer Science For First Examination In 2021 9618 · 20

Further programming

152 questions. Open a question to solve it and check the official answer.

2025 May-June · Paper 32 · Q12(b)(i)

Programming paradigms · 1 mark

(i) Identify the object-oriented programming (OOP) term described as ‘an occurrence of an object’. ................................................................................…

2025 May-June · Paper 32 · Q12(b)(ii)

Programming paradigms · 2 marks · official answer ready

(ii) Describe what is meant by the OOP term polymorphism. .........................................................................................................................…

2025 May-June · Paper 33 · Q5

Programming paradigms · 4 marks · official answer ready

5 Complete the table by filling in the missing object-oriented programming (OOP) terms and descriptions. OOP term Description A method that accesses the value of a property. .....…

2025 May-June · Paper 41 · Q3(a)(ii)

Programming paradigms · 3 marks · official answer ready

(ii) Write program code for the three get methods. Save your program. Copy and paste the program code into part 3(a)(ii) in the evidence document. [3]

2025 May-June · Paper 41 · Q3(a)(iii)

Programming paradigms · 3 marks · official answer ready

(iii) The method SetLeft() takes an object of type Node as a parameter. The method stores the parameter in the attribute LeftNode The method SetRight() takes an object of type Nod…

2025 May-June · Paper 41 · Q3(b)

Programming paradigms · 2 marks · official answer ready

(b) Write the main program to declare five objects of type Node : • Node 1 with the data 10 • Node 2 with the data 20 • Node 3 with the data 5 • Node 4 with the data 15 • Node 5 w…

2025 May-June · Paper 41 · Q3(c)(i)

Programming paradigms · 2 marks · official answer ready

(i) Write program code to declare the class Tree and its constructor. Do not declare the other methods. Use your programming language appropriate constructor. If you are writing i…

2025 May-June · Paper 41 · Q3(c)(ii)

Programming paradigms · 1 mark · official answer ready

(ii) Write program code for GetRootNode() Save your program. Copy and paste the program code into part 3(c)(ii) in the evidence document. [1]

2025 May-June · Paper 41 · Q3(e)(i)

Programming paradigms · 3 marks · official answer ready

(i) Write program code to extend the main program to: • create a new object of type Tree with the node containing the data 10 as the first node • insert the nodes with the values …

2025 May-June · Paper 42 · Q3(a)(i)

Programming paradigms · 4 marks · official answer ready

(i) Write program code to declare the class Animal and its constructor. Do not declare the other methods. Use your programming language appropriate constructor. If you are writing…

2025 May-June · Paper 42 · Q3(a)(ii)

Programming paradigms · 3 marks · official answer ready

(ii) The method Description() creates and returns a string of the animal’s data in the format: "The animal's name is " ", it makes a " ", its size is " " and its intelligence leve…

2025 May-June · Paper 42 · Q3(b)(i)

Programming paradigms · 4 marks · official answer ready

(i) Write program code to declare the class Parrot, its constructor and the method ChangeNumberWords() Use your programming language appropriate constructor. If you are writing in…

2025 May-June · Paper 42 · Q3(b)(ii)

Programming paradigms · 2 marks · official answer ready

(ii) The method Description() in the class Parrot creates and returns a string of the animal’s data in the format: "The animal's name is " ", it makes a " ", its size is " " and i…

2025 May-June · Paper 42 · Q3(c)(i)

Programming paradigms · 4 marks · official answer ready

(i) Write program code to declare the class Wolf, its constructor and the method SetTerritorySize() Use your programming language appropriate constructor. If you are writing in Py…

2025 May-June · Paper 42 · Q3(c)(ii)

Programming paradigms · 2 marks · official answer ready

(ii) The method Description() in the class Wolf creates and returns a string of the animal’s data in the format: "The animal's name is " ", it makes a " ", its size is " " and its…

2025 May-June · Paper 42 · Q3(d)(i)

Programming paradigms · 2 marks · official answer ready

(i) The main program declares instances of the classes for three animals: • A parrot with the name ‘Chewie’; it makes a ‘Squawk’ sound. Its size is 1, intelligence is 10, wingspan…

2025 May-June · Paper 42 · Q3(d)(ii)

Programming paradigms · 3 marks · official answer ready

(ii) The main program also needs to: • decrease the territory for the wolf Nighteyes by 20 square miles • increase the number of words the parrot Chewie can say by 2 words • outpu…

2025 May-June · Paper 43 · Q3(a)(i)

Programming paradigms · 4 marks · official answer ready

(i) Write program code to declare the class Node and its constructor. Do not declare the other methods. Use your programming language appropriate constructor. If you are writing i…

2025 May-June · Paper 43 · Q3(a)(ii)

Programming paradigms · 3 marks · official answer ready

(ii) Write program code for the two get methods. Save your program. Copy and paste the program code into part 3(a)(ii) in the evidence document. [3]

2025 May-June · Paper 43 · Q3(a)(iii)

Programming paradigms · 2 marks · official answer ready

(iii) The method SetNextNode() takes an object of type Node as a parameter. The method stores the parameter in the attribute NextNode Write program code for SetNextNode() Save you…