Order
Class Order
represents orders of zero or more products (in an imaginary and
way simplified online store). This simple implementation does not record every
individual instance of a product added to the order, only the total price of the
added products.
- Value parameters:
- number
a number that uniquely identifies the order (a positive integer)
- orderer
the customer that placed the order
Value members
Concrete methods
Adds a number of products to the order, as indicated by the parameters. In practice, what this means is that the total price of the order increases by the total price of the newly added products.
Adds a number of products to the order, as indicated by the parameters. In practice, what this means is that the total price of the order increases by the total price of the newly added products.
- Value parameters:
- numberOfUnits
the number of identical items that are added
- pricePerUnit
the price of an individual item of the added product type