Chapter 16: The Design Workflow Chapter 17: Design Classes CS 426 Senior Projects in Computer Science Chapter 16: The Design Workflow Chapter 17: Design Classes [Arlow and Neustadt, 2005] University of Nevada, Reno Department of Computer Science & Engineering
Outline The design workflow The design metamodel Design workflow details UP activity: architectural design UP activity: design a class Anatomy of a design class Well-formed design classes Inheritance, templates, & nested classes
The Design Workflow Chapter 16 roadmap
The Design Workflow Design emphasized in Elaboration and Construction phases
The Design Metamodel
The Design Metamodel
The Design Metamodel Design models are made up of Design subsystems Design classes Interfaces Use case realizations (design) [An early] deployment diagram
Artifact Trace Relationships
Should We Maintain Two Models?
Should We Maintain Two Models? The analysis view is useful for: Introducing new people to the project Understanding the system long time after delivery Understanding how the system satisfies requirements Providing requirements traceability Planning maintenance and evolution Understanding the logical architecture of the system Outsourcing the construction of the system
Should We Maintain Two Models? Guidelines: An analysis view should be preserved for large, complex, strategic, potentially long-lived systems Is the system is small, not strategic, or has a short expected life, separate analysis and design models might be overkill Caution though: many systems long outlive their projected life span
Design Workflow Detail
UP Activity: Architectural Design
Chapter 17 Roadmap
UP Activity: Designing a Class
What Are Design Classes?
Anatomy of a Design Class
Well-formed Design Classes Characteristics of well-formed design classes Complete and sufficient Primitive High cohesion Low coupling
Inheritance Aggregation versus inheritance Inheritance is the strongest form of coupling Encapsulation is weak within a class hierarchy (fragile base class problem) Inheritance is the most inflexible type of relationship
Inheritance
Multiple Inheritance
Templates
Templates
Templates
Templates
Nested Classes