ObjectOriented Design Notation CS 123CS 231 References z
Object-Oriented Design Notation CS 123/CS 231
References z. Main Reference: UML Distilled, by Martin Fowler ÕChapters 3, 4, 6, and 8 z. Supplementary References: ÕChapter 14 of Sommerville ÕChapter 22 of Pressman
Component Design and Detailed Design z. Component Design ÕFor each subsystem determine components, and services/interface per component ÕOO Design: components are classes z. Detailed Design ÕDetermine attributes of classes and relationships between the classes ÕDetermine functionality of each class and interactions between classes
Object-Oriented Modeling z. UML: Unified Modeling Language ÕOO Modeling Standard ÕBooch, Jacobson, Rumbaugh z. What is depicted? ÕClass details and static relationships ÕSystem functionality ÕObject interaction ÕState transition within an object
Some UML Modeling Techniques z. Class Diagrams z. Use Cases/Use Case Diagrams z. Interaction Diagrams z. State Diagrams
Example: Class Diagram Fast. Food. Counter totalcash totalorders counters 5 Fast. Food (Restaurant) pc Price. Checker get. Price()
Example: Use Case Diagram LIBRARY SYSTEM Facilitate Checkout Librarian Search for Book Facilitate Return Borrower
Example: Interaction Diagram Checkout Screen 2: check. If. Available() : Book 1: check. If. Delinquent() 3: borrow. Book() 4: set. Borrower() : Borrower
Example: State Diagram (Book) start Reserved Borrowed New Librarian activates book as available Borrower returns book Available
Object-Oriented Design Models z. Static Model ÕClass Diagrams z. Dynamic Model ÕUse Cases, Interaction Diagrams, State Diagrams, others
OO Static Model z. Classes and Class Diagrams z. Relationships ÕAssociation ÕAggregation/Composition ÕInheritance z. Dependencies z. Attribute and Method names
OO Dynamic Model z. Goal: Represent ÕObject behavior ÕObject interaction z. Traditional/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) Delivery info Accept and Post Delivery Transaction Item Master
OO Counterpart: Object Interaction new (delivery info) Encoder : Transaction post (item count) : Item Master
Building an OO Dynamic Model z. Identify use cases z. Describe each use case through an interaction diagram z. For more complex objects, provide a state diagram per class z. Derive implied methods (and attributes)
What’s Next? z. Need to understand the notation z. Make sure it helps the software development process z. When to use the UML techniques ÕPrimarily when specifying OO design ÕFormal means of communication across the different software development stages
- Slides: 16