Documente Academic
Documente Profesional
Documente Cultură
com
Class Diagram
Ref: Web
intro
A class diagram in the Unified Modeling Language (UML) is a type of static structure
diagram that describes the structure of a system by showing the system's classes, their
attributes, operations (or methods), and the relationships among objects.
It consists of:
Simple Association
• A structural link between two peer classes.
• There is an association between Class1 and Class2
• A solid line connecting two classes
Composition
• A special type of aggregation where parts are destroyed when the whole is destroyed.
• Objects of Class2 live and die with Class1.
• Class2 cannot stand by itself.
• A solid line with a filled diamond at the association connected to the class of composite
Qualified association
Qualified associations provide the same
functionality as indexes. The notation has a bit of a
twist, so pay attention. To indicate that a customer
can look up an order using the order's ordernumber
attribute, the ordernumber attribute name is placed
in a rectangular box on the Customer end of the
association. All the other association notation
remains intact but is pushed out to the edge of the
rectangle. Also, because the qualifier is an attribute,
it may include a data type.
<<boundary>>
User Interface::AddAdvertUI
User Interface::withdrawUI
startInterface( ) startInterface( )
selectAccount( ) selectClient( )
User Interface::withdrawUI
getAmount( ) selectCampaign( )
<<entity>>
Card Card
CardNo CardNo
PIN PIN
status status
changePIN() Card
changePIN()
checkPIN( ) checkPIN( )
<<control>>
Control::withdrawCtrl
Control::withdrawCtrl
withdraw( )
withdraw( )
withdrawCtrl