Further programming
192 questions. Open a question to solve it and check the official answer.
Programming paradigms · 3 marks
(ii) Object-oriented .................................................................................................................. ...........................................…
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…
Programming paradigms · 4 marks
(ii) Write program code for the following three get methods. Programming language .................................................................................................…
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…
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…
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…
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…
Programming paradigms · 1 mark · official answer ready
(i) Define the term programming paradigm. .........................................................................................................................................…
Programming paradigms · 2 marks · official answer ready
(ii) Give two examples of programming paradigms, other than declarative and object-oriented programming. 1 ........................................................................…
Programming paradigms · 2 marks · official answer ready
(a) Explain why the properties are private. .......................................................................................................................................…
Programming paradigms · 5 marks · official answer ready
(b) Write program code for the Constructor() method. Programming language .........................................................................................................…
Programming paradigms · 2 marks · official answer ready
(c) Write program code for the GetNumber() method. Programming language ...........................................................................................................…
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 ..............…
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…
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…
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,…
Programming paradigms · 2 marks · official answer ready
(ii) Explain inheritance with reference to the circus example. ....................................................................................................................…
Programming paradigms · 1 mark · official answer ready
(i) Define the term programming paradigm. .........................................................................................................................................…
Programming paradigms · 2 marks · official answer ready
(ii) Give two examples of programming paradigms, other than declarative and object-oriented programming. 1 ........................................................................…
Programming paradigms · 2 marks · official answer ready
(a) Explain why the properties are private. .......................................................................................................................................…
