Lecture OO05 Object Scenarios Object Interaction Diagrams
References Ambler, S., The Object Primer, Cambridge Univ. Press, 2001, Section 3.5, 5.9 Fowler & Scott, UML Distilled Applying the Standard Object Modeling Language, AWL, 1997, Chapt 6
Teaching Points Introduction to Collaboration Diagrams ATM example using CRC cards
Review What about assignment? What about parameter passing? What about equivalence? What about garbage collection? What is the OO paradigm?
Collaboration Diagrams (Objects) A type of Interaction Diagram Objects name type
Collaboration Diagrams Multiple instances here we have many objects of the class ATM
Collaboration Diagrams (Links) Links indicate collaboration between objects this is visibility
Collaboration Diagrams (Messages) There must be visibility in order for a message to be sent Numbering
Collaboration Diagrams (Messages) Showing message parameters
Collaboration Diagrams (Messages) self delegation
CRC Card Example #1 (ATM System) Objective Develop a ATM banking system just the transaction handling portion (user interface is another project) Analysis Study requirement documents User interviews Existing reports Existing files and databases
An ATM System A bank account transaction processing sub-system is required for an automatic teller machine system. The sub-system is responsible for allowing a client to use his/her bank card to view the current account balance, make a deposit, or make a cash withdrawal. The user interface for the system will be a separate sub-system.
Candidate Classes FinancialTransaction Account BalanceInquiry PIN Printer AuthorizeSystemInteraction Withdrawal ATMSystem Deposit BankCardReader Balance KeypadScreen UserInterface
Core Classes Core Undecided Irrelevant FinancialTransaction Account BalanceInquiry Withdrawal Deposit BankCardReader AuthorizeSystemInteraction UserInterface Undecided PIN (attribute) Balance (attribute) ATMSystem (ghost - system name) Irrelevant KeypadScreen Printer
Teaching Points Introduction to Collaboration Diagrams ATM example using CRC cards