9.17. Example: Attributes in the Domain Models
Case Study: NextGen POS
See Figure 9.27. The attributes chosen reflect the information requirements for this iterationthe Process Sale cash-only scenarios of this iteration. For example:
CashPayment | amountTendered To determine if sufficient payment was provided, and to calculate change, an amount (also known as "amount tendered") must be captured. |
Product-Description | description To show the description on a display or receipt.itemId To look up a ProductDescription .price To calculate the sales total, and show the line item price. |
Sale | dateTime A receipt normally shows date and time of sale, and this is useful for sales analysis. |
SalesLineItem | quantity To record the quantity entered, when there is more than one item in a line item sale (for example, five packages of tofu). |
Store | address, name The receipt requires the name and address of the store. |
Figure 9.27. NextGen POS partial domain model.
[View full size image]
Case Study: Monopoly
See Figure 9.28. The attributes chosen reflect the information requirements for this iterationthe simplified Play Monopoly Game scenario of this iteration. For example:
Die | faceValue After rolling the dice, needed to calculate the distance of a move. |
Square | name To print the desired trace output. |