Java Reference
In-Depth Information
relationship between an invoice and a product. An invoice doesn't store products
directlyȌthey are stored in the LineItem objects.
There is no inheritance in this example.
Figure 7 shows the class relationships that we discovered.
Figure 7
The Relationships Between the Invoice Classes
12.4.4 Method Documentation
Use javadoc comments (with the method bodies left blank) to record the
behavior of classes.
The final step of the design phase is to write the documentation of the discovered
classes and methods. Simply write a Java source file for each class, write the
method comments for those methods that you have discovered, and leave the bodies
of the methods blank.
/**
Describes an invoice for a set of purchased products.
*/
public class Invoice
{
/**
Adds a charge for a product to this invoice.
@param aProduct the product that the customer ordered
548
549
Search WWH ::




Custom Search