



















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Refining Analysis Relationships, Aggregation Relationship, Aggregation, Composition, Many-to-One Association, One-to-Many Association, Collections, Modeling with Collections, Reifying Analysis Relationships, Structured Classifier, Structured Class, Raman Ramsin, Lecture Slides, Object Oriented Design, Department of Computer Engineering, Sharif University of Technology, Iran.
Typology: Slides
1 / 27
This page cannot be seen from the preview
Don't miss anything!




















Department of Computer Engineering
Department of Computer Engineering
Refining Analysis Relationships Relationships in analysis are converted to implementable design relationships. Refining analysis relationships to design relationships involves: adding navigability; adding multiplicity to both ends of the association; adding a role name at both ends of the association, or at least on the target end of the association; implementing one-to-one, one-to-many, many-to-one, and many-to-many associations; implementing bidirectional associations and association classes; using structured classifiers for modeling composition.
Department of Computer Engineering
Aggregation Relationship: Asymmetry Aggregation relationship is asymmetric: a whole can never directly or indirectly be a part of itself; there must never be a cycle in the aggregation graph.
Department of Computer Engineering
Aggregation and Composition There are two types of aggregation relationship: Aggregation ; Composition Aggregation - usually referred to simply as Composition.
Department of Computer Engineering
Composition A strong form of aggregation (like a tree and its leaves): the parts belong to exactly one composite at a time; the composite has sole responsibility for the disposition of all its parts - this means responsibility for their creation and destruction; the composite may also release parts, provided responsibility for them is assumed by another object; if the composite is destroyed, it must destroy all its parts or give responsibility for them over to some other object; each part belongs to exactly one composite so you can only have composition hierarchies - composition networks are impossible.
Department of Computer Engineering
Refining Analysis Relationships: One-to-One Association Add navigability to the model; refine into Composition only if the semantics apply; you may also choose to merge the two classes.
Department of Computer Engineering
Refining Analysis Relationships: One-to-Many Association There is a collection of objects on the target side: Use an inbuilt array (most OO languages directly support arrays) - they are generally quite inflexible but are usually fast. Use a collection class - they are more flexible than inbuilt arrays and are faster than arrays when searching the collection is required (otherwise they are slower).
Department of Computer Engineering
Collections Classes specialized so that their instances can manage a collection of other objects. All collection classes have operations for: adding objects to the collection; removing objects from the collection; retrieving a reference to an object in the collection; traversing the collection - stepping through the collection from the first object to the last.
Department of Computer Engineering
Modeling with Collections There are four options:
Department of Computer Engineering
Modeling with Collections There are four options:
Department of Computer Engineering
Modeling with Collections There are four options:
Department of Computer Engineering
Modeling with Collections There are four options:
Department of Computer Engineering
Reifying Analysis Relationships Some relationships are pure analysis artifacts and must be made implementable by the process of reification:
Department of Computer Engineering
Reifying Relationships: Many-to-Many Associations