unit 3 attributes, methods, relationships
DESCRIPTION
TRANSCRIPT
![Page 1: Unit 3 attributes, methods, relationships](https://reader035.vdocuments.site/reader035/viewer/2022080209/54c2ecea4a795990308b45bf/html5/thumbnails/1.jpg)
Identifying object relationships ,attributes ,
methods,
![Page 2: Unit 3 attributes, methods, relationships](https://reader035.vdocuments.site/reader035/viewer/2022080209/54c2ecea4a795990308b45bf/html5/thumbnails/2.jpg)
Types of relationships
• Association
• Super-sub structure (generalization hierarchy)
• Aggregation and part of a structure
![Page 3: Unit 3 attributes, methods, relationships](https://reader035.vdocuments.site/reader035/viewer/2022080209/54c2ecea4a795990308b45bf/html5/thumbnails/3.jpg)
Association
• Represents physical or conceptual connection between 2 or more objects
• Binary association– Line connecting 2 classes
• Ternary and higher order association– Diamond connecting to a class symbol by line
• Association name is written above or below the name
• Includes name of the role
![Page 4: Unit 3 attributes, methods, relationships](https://reader035.vdocuments.site/reader035/viewer/2022080209/54c2ecea4a795990308b45bf/html5/thumbnails/4.jpg)
Cont..
• Identifying association
• Common association pattern
• Eliminating unnecessary association
![Page 5: Unit 3 attributes, methods, relationships](https://reader035.vdocuments.site/reader035/viewer/2022080209/54c2ecea4a795990308b45bf/html5/thumbnails/5.jpg)
Identifying association
• Begins by analyzing the interaction among classes
• Ask following questions– Is the class capable of fulfilling the required task by
itself– If not, what does it need– From what other class can it acquire what it needs
• Guideline– Dependency between 2 or more classes
• Association corresponds to verb or prepositional phrase– Reference from one class to another
• Implicit or taken from knowledge
![Page 6: Unit 3 attributes, methods, relationships](https://reader035.vdocuments.site/reader035/viewer/2022080209/54c2ecea4a795990308b45bf/html5/thumbnails/6.jpg)
Common association pattern
• Location association– Ex: next to, part of , contained in
• Communication association– Ex :talk to, order to
customeroperator
order
![Page 7: Unit 3 attributes, methods, relationships](https://reader035.vdocuments.site/reader035/viewer/2022080209/54c2ecea4a795990308b45bf/html5/thumbnails/7.jpg)
Eliminate unnecessary association
• Implementation association– Defer implementation specific association to design phase– Not concerned about relationship among business objects
• Ternary association– Complicate the representation– Req
• Restate ternary association to binary association
• Directed actions or derived association– Can be defined in terms of other association– Leads to redundancy– Ex:
raman abiGrant parent of
raman abiparent of
muruganparent of
![Page 8: Unit 3 attributes, methods, relationships](https://reader035.vdocuments.site/reader035/viewer/2022080209/54c2ecea4a795990308b45bf/html5/thumbnails/8.jpg)
Super-sub class relationships
• Generalization hierarchy
• Represents the inheritance re
![Page 9: Unit 3 attributes, methods, relationships](https://reader035.vdocuments.site/reader035/viewer/2022080209/54c2ecea4a795990308b45bf/html5/thumbnails/9.jpg)
![Page 10: Unit 3 attributes, methods, relationships](https://reader035.vdocuments.site/reader035/viewer/2022080209/54c2ecea4a795990308b45bf/html5/thumbnails/10.jpg)