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.
Parameters
number
a number that uniquely identifies the order (a positive integer)
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.
Parameters
numberOfUnits
the number of identical items that are added
pricePerUnit
the price of an individual item of the added product type