Kirstyszegna
Badges: 2
Rep:
?
#1
Report Thread starter 3 months ago
#1
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.
0
reply
dpatel10101
Badges: 6
Rep:
?
#2
Report 3 weeks ago
#2
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?
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

If you haven't confirmed your firm and insurance choices yet, why is that?

I don't want to decide until I've received all my offers (129)
34.96%
I am waiting until the deadline in case anything in my life changes (49)
13.28%
I am waiting until the deadline in case something in the world changes (ie. pandemic-related) (22)
5.96%
I am waiting until I can see the unis in person (36)
9.76%
I still have more questions before I made my decision (49)
13.28%
No reason, just haven't entered it yet (43)
11.65%
Something else (let us know in the thread!) (41)
11.11%

Watched Threads

View All