The Student Room Group

Urgent help

Please help with this question!!

A supermarket uses an object-oriented approach to organise items it offers. Part of the class definition for the ItemsForSale class is shown below

class
ItemForSale
public itemName
public price
public discount
...

endclass

The discount attribute represents a percentage discount on the price. The discount can be between 0 and 50 (inclusive). All new items for sale initially have a discount value of 0.

Write the constructor method for the ItemsForSale class.
Im also struggling with this question! Could I ask if you have the mark scheme to this question? Im pretty sure this is from the November papers?

Quick Reply

Latest

Trending

Trending