July 2001
Intermediate to advanced
656 pages
15h 51m
English
The following section dissects the motivation for the postconditions of the enterItem system operation.
After the itemID and quantity of an item have been entered, what new object should have been created? A SalesLineItem. Thus:
A SalesLineItem instance sli was created (instance creation).
Note the naming of the instance. This name will simplify references to the new instance in other post-condition statements.
After the itemID and quantity of an item have been entered by the cashier, what attributes of new or existing objects should have been modified? The quantity of the SalesLineItem should have become equal to the quantity parameter. Thus:
sli.quantity ...
Read now
Unlock full access