previous |
start |
next
Example: Printing an Invoice - Implementation
- The UML diagram will give instance variables
- Associated classes yield instance variables
- Invoice is associated with Address and Item
- An Invoice has one Address. Declare one Address instance
variable.
- private Address billingAddress;
- An Invoice has multiple Items. Use an ArrayList to hold
Items.
- private ArrayList items
previous |
start |
next