Further programming
152 questions. Open a question to solve it and check the official answer.
Programming paradigms · 5 marks · official answer ready
(a) The constructor takes the picture description, frame colour, height, and width as parameters and sets these to the private attributes. Write the program code to declare the cl…
Programming paradigms · 3 marks · official answer ready
(b) The four get methods return the associated attribute, for example, GetDescription() returns the description of the picture. Write the four get methods. Save your program. Copy…
Programming paradigms · 2 marks · official answer ready
(c) The method SetDescription() takes a new description as a parameter, and writes this value to the appropriate attribute. Write the method SetDescription(). Save your program. C…
Programming paradigms · 1 mark · official answer ready
(d) Write program code to declare an array of type Picture with 100 elements. Save your program. Copy and paste the program code into part 2(d) in the evidence document. [1]
Programming paradigms · 8 marks · official answer ready
(e) The text file Pictures.txt stores the data for the pictures in the order: description, width, height, colour. For example, for the first picture in the text file: Flowers is t…
Programming paradigms · 2 marks · official answer ready
(f) The main program calls the function ReadData(). Write the main program. Save your program. Copy and paste the program code into part 2(f) in the evidence document. [2] 6
Programming paradigms · 7 marks · official answer ready
(g) The main program needs to ask the user to input their requirements for a picture. The user will enter the colour of the frame, the maximum width, and the maximum height of the…
Programming paradigms · 2 marks · official answer ready
(h) Test your program by inputting the following search criteria: • BLACK, 100, 100 • silver, 25, 25 Take screenshots to show the output for both search criteria. Copy and paste t…
Programming paradigms · 5 marks · official answer ready
(a) Create a new program. Write program code to declare the class TreasureChest. Do not write any other methods. The attributes are private. If you are using the Python programmin…
Programming paradigms · 0 marks · official answer ready
(b) The text file TreasureChestData.txt stores data for five questions, in the order of question, answer, points. For example, the first three lines of the file are for the first …
Programming paradigms · 5 marks · official answer ready
(a) Create a new program. Write program code to declare the class TreasureChest. Do not write any other methods. The attributes are private. If you are using the Python programmin…
Programming paradigms · 0 marks · official answer ready
(b) The text file TreasureChestData.txt stores data for five questions, in the order of question, answer, points. For example, the first three lines of the file are for the first …
