Computer Science 9608 · 20

Further programming

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

2019 May-June · Paper 43 · Q2(c)(ii)

Programming paradigms · 3 marks

(ii) Object-oriented .................................................................................................................. ...........................................…

2019 May-June · Paper 43 · Q2(d)(i)

Programming paradigms · 5 marks

(i) The constructor receives the parameter InputPlayerID to create the PlayerID. Other properties are initialised as instructed in the class diagram. Write program code for the Cr…

2019 May-June · Paper 43 · Q2(d)(ii)

Programming paradigms · 4 marks

(ii) Write program code for the following three get methods. Programming language .................................................................................................…

2019 May-June · Paper 43 · Q2(d)(iii)

Programming paradigms · 4 marks

(iii) The method SetPlayerID()asks the user to input the new player ID and reads in this value. It checks that the length of the PlayerID is less than or equal to 15 characters an…

2019 May-June · Paper 43 · Q2(d)(iv)

Programming paradigms · 5 marks

(iv) The method SetScore()checks that its INTEGER parameter ScoreInput is valid. If it is valid, it is then set as Score. A valid ScoreInput is greater than or equal to 0 and less…

2019 May-June · Paper 43 · Q2(d)(v)

Programming paradigms · 4 marks

(v) Write program code for the method SetCategory(). Use the properties and methods in the original class definition. Players will be placed in one of the following categories. Ca…

2019 May-June · Paper 43 · Q2(d)(vi)

Programming paradigms · 8 marks

(vi) Joanne has played the first game to place her in a category for the competition. The procedure CreatePlayer()performs the following tasks. • allows the player ID and score to…

2018 October-November · Paper 41 · Q1(d)(i)

Programming paradigms · 1 mark · official answer ready

(i) Define the term programming paradigm. .........................................................................................................................................…

2018 October-November · Paper 41 · Q1(d)(ii)

Programming paradigms · 2 marks · official answer ready

(ii) Give two examples of programming paradigms, other than declarative and object-oriented programming. 1 ........................................................................…

2018 October-November · Paper 41 · Q5(a)

Programming paradigms · 2 marks · official answer ready

(a) Explain why the properties are private. .......................................................................................................................................…

2018 October-November · Paper 41 · Q5(b)

Programming paradigms · 5 marks · official answer ready

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

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

Programming paradigms · 2 marks · official answer ready

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

2018 October-November · Paper 41 · 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 41 · 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 October-November · Paper 42 · Q4(a)

Programming paradigms · 4 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. Performer Acrobat First…

2018 October-November · Paper 42 · Q4(c)

Programming paradigms · 8 marks · official answer ready

(c) The program will display the acrobat information as follows: Sally Superstar (real name Sally Smith) is an acrobat. Fire is part of Sally Superstar’s act. When not performing,…

2018 October-November · Paper 42 · Q4(d)(ii)

Programming paradigms · 2 marks · official answer ready

(ii) Explain inheritance with reference to the circus example. ....................................................................................................................…

2018 October-November · Paper 43 · Q1(d)(i)

Programming paradigms · 1 mark · official answer ready

(i) Define the term programming paradigm. .........................................................................................................................................…

2018 October-November · Paper 43 · Q1(d)(ii)

Programming paradigms · 2 marks · official answer ready

(ii) Give two examples of programming paradigms, other than declarative and object-oriented programming. 1 ........................................................................…

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

Programming paradigms · 2 marks · official answer ready

(a) Explain why the properties are private. .......................................................................................................................................…