Lecture 5: Centre for software reliability Flashcards
What are the design artifacts of a metamodel?
- Sybsystems are components that contain **UML elements **
- There is a <<trace>> </trace>relationship between two models
What does a design model consists of?
- Design subsystem
- Design class
- Interface
- Use case realisation design
- Deployment model
What are design classes?
Captures the required behaviour of the system without worrying about the behaviour that is going to be implemented
Where do design classes come from?
From analysis classes only
What do design analysis classes model?
- The classes captures the problem domain
- The implementation details
- The attributes specified: type, visibility and default and values
What must design classes have?
- Parameter lists
- Return types
- Visibility/exceptions
- SET & GET operations
- Constructors and destructors
- Complete set of attributes
What are the characteristics of a Well- formed design classes?
- Complete and sufficient
- Doing something of what a user expects the class to do from its name
Example: A BankAccount class provides: withdraw()/desposit() operations - Primitive
- Should have a single primitive, never multiple ways of doing multiple things
-
High Cohesion
-** **Should have a set of operations that support the intent of the class
Cohesion makes the class more understandable, small set of simple responsibilities such as HotelStay and not HotelCarStay -
Low Coupling
-** **Should be associated with enough classes using semantic links
What does the inheritance feature do in design classes?
Inheritance to **INHERITS **implementation
What are the two things that must be considered in inheritance?
- *Interface**
- The public operations of base classes
- *Implementation**
- The attributes, relationships, protected and private operations of the base classes
What does the interface realisation do in the design classes?
Interface realisation in an interface has NO implementation but to DEFINE a contract
Give an example from the tutorial of what a class diagram should look like:
What does multiplicity model?
- Models a collection of things
- How many objects can participate in a relationship
What 2 procedures does a design class involve?
Refining associations to aggregation or composition relationships
What are the 6 associations of the relationships?
- Implementing one-to-many associations
- Implementing many-to-one associations
- Implementing many-to-many associations- Stores a collection of objects from the source and target class
- Implementing bidirectional associations – reify “make real” into design classes – Resolve from a bidirectional to a unidirectional
- Implementing association classes – Refine all to association classes
What must design classes also have?
- Navigability
- Multiplicity on both ends