[Time 5:50 mins]
In this section we will identify collaborations among the classes as they enact each use case. In this phase we may discover new classes that we had not thought of earlier, as well as new responsibilities for existing classes. We may also discard some initial classes. The process of determining the collaborations as each use case is enacted helps in refining and validating the design.
CUSTOMER DETERMINES THE PRICE OF A GROUP OF ITEMS:
- Customer enters item codes at the UserTerminal
- UserTerminal creates Item objects for each item and finds out their individual prices
- The UserTerminal finds out all the schemes these items belong to
- The UserTerminal determines the Scheme price of all items belonging to a Scheme and adds the individual price of the remaining items
- The UserTerminal displays all the above information to the Customer
CUSTOMER CHECKS OUT ITEMS:
- Customer takes items to the checkout system
- Checkout assistant adds item codes in the CheckoutSystem
- Checkout system determines the price of all the items, taking into account discounts and schemes
- Checkout system generates a bill for the customer
- Checkout system accepts the customers payment
STOREMANAGER DETERMINES THE SHOP INVENTORY VALUATION
- The StoreManager uses the ControlPanel to get inventory vauation
- The ControlPanel uses the CurrentStock to get the valuation
- The CurrentStock object determines the price of every individual item and the price of items and represents it as the maximum price in the PriceRange
- The CurrentStock determines the minimum price by associating items into schemes and assuming that they are sold such
- The CurrentStock returns the PriceRange object back to the ControlPanel which displays the details to the StoreManager
New classes identified:
- UserTerminal
- CheckoutSystem
- PriceCalculator
- ControlPanel
- PriceRange
Note: This post was originally posted on my blog at http://www.adaptivelearningonline.net
Comments