University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 classes continued 1 association...

Preview:

Citation preview

University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 classes continued 1

associationconnection between classes representing either logical relationships or message paths

generalizationthe abstraction of common features among classes by thecreation of a hierarchy of more general classes (superclasses)that encapsulate the common features

dependencya relationship between two model elements such that a changein one element may require a change in the dependent element

aggregationa whole-part association between two or more objects thatrepresent the whole and the other parts of that whole

compositionaggregation where no part can belong to more than onecomposition at a time and if the composite whole is deletedits parts are deleted with it

VV

University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 classes continued 2

Fig. 3-40, UML Notation Guide

Person

Manages

JobCompany

boss

worker

employeeemployer

0..1

Job

Account

Person

Corporation

{Xor}

salary

Reference: OMG tutorial on UML by Cris Kobryn

associations

University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 classes continued 3

Fig. 3-45, UML Notation Guide

Window

scrollbar [2]: Slidertitle: Headerbody: Panel

Window

scrollbar title body

Header Panel

2 1 1

Slider

111

Reference: OMG tutorial on UML by Cris Kobryn

composition

University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 classes continued 4

Fig. 3-47, UML Notation Guide

Shape

SplineEllipsePolygon

Shape

SplineEllipsePolygon

Shared Target Style

Separate Target Style

. . .

. . .

Reference: OMG tutorial on UML by Cris Kobryn

generalization

University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 classes continued 5

Fig. 3-50, UML Notation Guide

«friend»ClassA ClassB

ClassC

«instantiate»

«call»

ClassD

operationZ()«friend»

ClassD ClassE

«refine»ClassC combines

two logical classes

Reference: OMG tutorial on UML by Cris Kobryn

dep

end

enci

es

University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 classes continued 6Reference: www.smartdraw.com

University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 classes continued 7

tools Argo UML argouml.tigris.org Object Domain

www.objectdomain.com/domain/evaluationIntro.html Rational Rose www.rational.com Microsoft Visio

www.objectmentor.com www.smartdraw.com www.objectdomain.com

references

Recommended