Note AcademyNote Academy

Computer Science · May / June 2025 · Paper 2 TZ2 HL · Question 14

IBCS

As printed in the paper

The question as text

14. A company sells healthcare products. Each product type is associated with a particular brand and brand price. A system is designed to manage product sales, customers, and suppliers. The Product class keeps details of a product. The following shows part of the code for this class: public class Product { private String prodCode; // eg X123 Private String prodType; // eg Sunscreen private String prodDescription; // about the product private Brand prodBrand; // an object of type Brand private int prodSale; // number of units sold // Constructor // code missing for constructor method public int getProdSale(){ return prodSale; } public Brand getProdBrand(){ return prodBrand; } // all accessor and mutator methods are present but not shown } // end of Product class The Brand class keeps details of a particular brand. The following shows part of the code for this class: public class Brand { private String brandName; // eg Safesun private float brandPrice; // price of the product of this brand public Brand(String brandName, float brandPrice) { this.brandName = brandName; this.brandPrice = brandPrice; } public float getBrandPrice() { return brandPrice; } // all accessor and mutator methods are present but not shown } // end of Brand class (Option D continues on the following page) (Option D, question 14 continued)

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme
  • 14(a)(i)[1]

  • 14(a)(ii)[1]

  • 14(a)(iii)[2]

  • 14(b)(i)[3]

  • 14(b)(ii)[3]

  • 14(c)(i)[3]

  • 14(c)(ii)[2]

  • 14(d)[2]

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.