Specification : Obligation to provide a connection between objects – Implementation : Object pointers, references, linking structures, etc.
Coming up: Association Names Associations Student Class Section Course Semester Instructor Department takes> is registered for> teaches> sponsors> <works for is instance of> is held d uring>
Coming up: Navigation Association Names Associations may be named – The names should communicate the meaning of the links – The names are typically verb phases – The name should include an arrow indicating the direction in which the name should be read
Coming up: Navigation Navigation The navigation of associations can be – uni-directional – bi-directional – unspecified Class Section Course Instructor Department teaches> sponsors> <works for is instance of>
Coming up: Generalization Generalization Generalization is another kind of relationship in UML – see Meta Model From an analysis perspective, it is a pure generalization/specialization concept, i.e., the specialization is a subset of the generalization Student Person Graduate Student
Coming up: Generalization Generalization From a specification/implementation perspective, generalization can represent sub- typing, inheritance, type capability, and substitutability (depends on the language) Student major: String GPA: Real standing: String add(Class Section) drop(Class Section) Person name: String address: String changeAddress(new_address)
Coming up: Class Diagrams Exercise – Simple Associations From an analysis perspective: – Identify meaningful associations and generalization/specializations among classes in the Elevator System
Coming up: Class Diagrams Class Diagrams Class Diagrams describe – the types of objects in a system – their properties (attributes and operations) – relationships between objects They can also include – Grouping concepts like packages – Constraints – Various kinds of annotations
Coming up: Multiplicity Constraints Multiplicity Constraints Student Class Section Course Semester Instructor Department takes> is registered for> teaches> sponsors> <works for is instance of> is held d uring> 1..* 1 1..* 1..* 1 1 1..* 0..8 0..* 0..6 1..3
Questions From the previous diagram – How many classes can a student take? – Do you have to be registered in any classes to be a student? – Do I need to teach this class to be an Instructor? Do I need to teach ANY classes?
Coming up: Dependencies Multiplicity Constraints A multiplicity constraint can be – a single number – a “*”, meaning an arbitrarily large number or simply “many” – a range, denoted by “min..max” – a sequence of single numbers and ranges
Coming up: Dependencies Dependencies Relation A consolidated snippet of the UML Meta-model Association Generalization Dependency Aggregation Binary Association N-ary Association
Coming up: Dependencies Dependencies A dependency is a type of relationship It says that one modeling component “uses” another.
- Fall '16
- Object-Oriented Programming