Computer Science 9608 · 20

20.1 Programming paradigms

192 questions in this subtopic. Open a question to solve it and check the official answer.

Reset
2018 October-November · Paper 43 · Q5(b)

Programming paradigms · 5 marks · official answer ready

(b) Write program code for the Constructor() method. Programming language .........................................................................................................…

2018 October-November · Paper 43 · Q5(c)

Programming paradigms · 2 marks · official answer ready

(c) Write program code for the GetNumber() method. Programming language ...........................................................................................................…

2018 October-November · Paper 43 · Q5(d)

Programming paradigms · 2 marks · official answer ready

(d) A card, OneS, has the value 1 for Number and the value "square" for Shape. Write program code to instantiate an instance of Cards for OneS. Programming language ..............…

2018 October-November · Paper 43 · Q5(e)

Programming paradigms · 6 marks · official answer ready

(e) The game has a function, Compare() that takes two cards as parameters and compares them. If the cards are identical, the function outputs "SNAP" and returns −1. If they are no…

2018 May-June · Paper 31 · Q2(d)

Programming paradigms · 4 marks · official answer ready

(d) Describe two different composite data types. Data type 1 ......................................................................................................................…

2018 May-June · Paper 33 · Q2(d)

Programming paradigms · 4 marks · official answer ready

(d) Describe two different composite data types. Data type 1 ......................................................................................................................…

2018 May-June · Paper 41 · Q5(a)

Programming paradigms · 3 marks · official answer ready

(a) Complete the following class diagram for the game. You do not need to include any additional get or set methods. GameElement AnimatedElement PositionX: INTEGER AnimationFrames…

2018 May-June · Paper 41 · Q5(b)

Programming paradigms · 6 marks · official answer ready

(b) Write program code to define the GameElement class. Programming language ......................................................................................................…

2018 May-June · Paper 41 · Q5(c)

Programming paradigms · 6 marks · official answer ready

(c) The Scenery() class has two attributes, CauseDamage and DamagePoints. If the attribute CauseDamage is TRUE, then the scenery element can cause damage. The method GiveDamagePoi…

2018 May-June · Paper 41 · Q5(d)(i)

Programming paradigms · 3 marks · official answer ready

(i) The attributes of GiftBox are as follows: Attribute Value PositionX 150 PositionY 150 Width 50 Height 75 ImageFilename "box.png" CauseDamage TRUE DamagePoints 50 Write program…

2018 May-June · Paper 41 · Q5(d)(ii)

Programming paradigms · 3 marks · official answer ready

(ii) An additional method, GetScenery(), returns all the attributes of the Scenery class. Write program code for the GetScenery() method. You should use the GetDetails() method th…

2018 May-June · Paper 42 · Q4(a)

Programming paradigms · 3 marks · official answer ready

(a) Complete the following class diagram to show the attributes, methods and inheritance for the program. You do not need to write the get and set methods. Member Team FirstName :…

2018 May-June · Paper 42 · Q4(b)

Programming paradigms · 5 marks · official answer ready

(b) Write program code for the Member class. Programming language ............................................................................................................ Prog…

2018 May-June · Paper 42 · Q4(c)

Programming paradigms · 5 marks · official answer ready

(c) Write program code for the Competitor class. Programming language ............................................................................................................ …

2018 May-June · Paper 42 · Q4(d)

Programming paradigms · 3 marks · official answer ready

(d) Omar Ellaboudy is an official at X-Games. He is first-aid trained and his job title is Judge. He is male and was born on 17/03/1993. Write program code to create an instance o…

2018 May-June · Paper 43 · Q5(a)

Programming paradigms · 3 marks · official answer ready

(a) Complete the following class diagram for the game. You do not need to include any additional get or set methods. GameElement AnimatedElement PositionX: INTEGER AnimationFrames…

2018 May-June · Paper 43 · Q5(b)

Programming paradigms · 6 marks · official answer ready

(b) Write program code to define the GameElement class. Programming language ......................................................................................................…

2018 May-June · Paper 43 · Q5(c)

Programming paradigms · 6 marks · official answer ready

(c) The Scenery() class has two attributes, CauseDamage and DamagePoints. If the attribute CauseDamage is TRUE, then the scenery element can cause damage. The method GiveDamagePoi…

2018 May-June · Paper 43 · Q5(d)(i)

Programming paradigms · 3 marks · official answer ready

(i) The attributes of GiftBox are as follows: Attribute Value PositionX 150 PositionY 150 Width 50 Height 75 ImageFilename "box.png" CauseDamage TRUE DamagePoints 50 Write program…

2018 May-June · Paper 43 · Q5(d)(ii)

Programming paradigms · 3 marks · official answer ready

(ii) An additional method, GetScenery(), returns all the attributes of the Scenery class. Write program code for the GetScenery() method. You should use the GetDetails() method th…