[Time 2:04 mins]
Here I have listed classes from the previous post and associated responsibilities to them.
Customer
- To shop
- To pay for the items
Item
- Holds an item code
- Has a cost
- Has a price
Scheme
- Holds a scheme code
- Has a price
- Contains a list of other Items
Price
- Holds the price (for an item)
DiscountedPrice
- Holds the price
- Holds the discount
PerUnitPrice
- Hold the price
- Holds the unit for the price
Unit (and subclasses)
- Specifies a unit
- May have methods for converting between units.
StoreManager
- Checks the audit trail of items sold
- Determines the value of current in-shop inventory
CurrentStock
- Contains a list of all items in the shop
Note: This post was originally posted on my blog at http://www.adaptivelearningonline.net
Comments