Suppose I am writing an e-tail system that supports sales in the United States. The general architecture has a controller object that handles sales requests. It identifies when a sales order is being requested and hands the request off to a SalesOrder object to process the order.
The system looks something like Figure 14-1.
The functions of SalesOrder include
Allow for filling out the order with a GUI.
Handle tax calculations.
Process the order. Print a sales receipt.
Some of these functions are likely to be implemented with the help of other objects. For example, SalesOrder would not necessarily print itself; rather, it serves as a holder for information about sales orders. A particular SalesOrder object could call a SalesTicket object that prints the SalesOrder.