Object-Oriented Design Notation CS 123/CS 231
References zMain Reference: UML Distilled, by Martin Fowler ÕChapters 3, 4, 6, and 8 zSupplementary References: ÕChapter 14 of Sommerville ÕChapter 22 of Pressman
Component Design and Detailed Design zComponent Design ÕFor each subsystem determine components, and services/interface per component ÕOO Design: components are classes zDetailed Design ÕDetermine attributes of classes and relationships between the classes ÕDetermine functionality of each class and interactions between classes
Object-Oriented Modeling zUML: Unified Modeling Language ÕOO Modeling Standard ÕBooch, Jacobson, Rumbaugh zWhat is depicted? ÕClass details and static relationships ÕSystem functionality ÕObject interaction ÕState transition within an object
Some UML Modeling Techniques zClass Diagrams zUse Cases/Use Case Diagrams zInteraction Diagrams zState Diagrams
Example: Class Diagram PriceChecker getPrice() FastFood (Restaurant) pc counters5 FastFoodCounter totalcash totalorders
Example: Use Case Diagram Facilitate Checkout Facilitate Return Search for Book LIBRARY SYSTEM Borrower Librarian
Example: Interaction Diagram Checkout Screen :Borrower :Book 1: checkIfDelinquent() 3: borrowBook() 2: checkIfAvailable() 4: setBorrower()
Example: State Diagram (Book) New Available Reserved Borrowed start Librarian activates book as available Borrower returns book
Object-Oriented Design Models zStatic Model ÕClass Diagrams zDynamic Model ÕUse Cases, Interaction Diagrams, State Diagrams, others
OO Static Model zClasses and Class Diagrams zRelationships ÕAssociation ÕAggregation/Composition ÕInheritance zDependencies zAttribute and Method names
OO Dynamic Model zGoal: Represent ÕObject behavior ÕObject interaction zTraditional/Procedural Dynamic Modeling ÕData Flow Diagrams (DFDs) ÕProblem: Processes separate from data ÕNeed modeling notation that highlight tight relationship between data & processes
DFD Example (Inventory Management) Accept and Post Delivery Item Master Transaction Delivery info
OO Counterpart: Object Interaction Encoder :Item Master :Transaction new (delivery info) post (item count)
Building an OO Dynamic Model zIdentify use cases zDescribe each use case through an interaction diagram zFor more complex objects, provide a state diagram per class zDerive implied methods (and attributes)
What’s Next? zNeed to understand the notation zMake sure it helps the software development process zWhen to use the UML techniques ÕPrimarily when specifying OO design ÕFormal means of communication across the different software development stages