Quelpr

Other parts of this question

  1. 6(a)Write the code for the Product class including the instance variables, constructor, accessor methods, toString() method, and the methods reduceItems(int amt)…[16 marks]
  2. 6(b)(ii)Write a code fragment to create/instantiate a named data structure to store all Product objects and add the two Product objects from 6(b)(i) to it.[3 marks]
  3. 6(b)(iii)Write code to print the names of all Product objects in the data structure that need to be reordered.[5 marks]
  4. 6(c)Discuss the easiest way to reuse the functionality of the Product class in another application that requires additional instance variables and an alternate…[4 marks]

More practice: the rest of this paper · more Implementation, Testing, and Maintenance questions · all CAPE Computer Science Unit 2 past papers