Wednesday, August 4, 2010

UML - class diagram

All text are from:


  • name
  • attributes
  • operations


  1. class
  2. interface
a) class
The class BankAccount is abstract class and the method: withdrawal is abstract. Notice the italicized text. You can use stereotype abstract too.

b) interface


  1. Bi-directional
  2. Uni-directional
a) Bi-directional

b) Uni-directional

Association class
In modeling an association, there are times when you need to include another class because it includes valuable information about the relationship. For this you would use an association class that you tie to the primary association. An association class is represented like a normal class.

An association with an aggregation relationship indicates that one class is a part of another class. In an aggregation relationship, the child class instance can outlive its parent class.

Because the relationship is a composition relationship, when the Company instance is removed/destroyed, the Department instance is automatically removed/destroyed as well. Another important feature of composition aggregation is that the part class can only be related to one instance of the parent class.

Reflexive association
A class can also be associated with itself, using a reflexive association.


MarkVisibility type
#    Protected
-    Private


0..1    Zero or one
1One only
0..*Zero or more
*    Zero or more
1..*One or more
3Three only
0..5Zero to Five
5..15    Five to Fifteen

No comments:

Post a Comment