Site icon TestingDocs.com

UML Class Diagram

UML Class Diagram

UML class diagram is a static diagram that shows classes and their relationships in the system. A class diagram is displayed as a rectangle with three components. A class is like blueprint that defines the object.

Class Symbol

Class symbol in UML Class diagrams consists of three components separated by lines in a rectangle.

 

Class name identified the class in the system.

Attributes define the state of the class. Methods show the behavior of the class.

 

Interface Symbol

Interface symbol is same like Class symbol with <<interface>>  string added to the top of the symbol. An interface is a contract between the class and to the public world. An interface contains only the method signatures without implementations. So, if the class implements an Interface all the methods should appear in the class.

Association

Association is represented as  a solid line connecting the classifier / (s).

Generalization

Composition

Aggregation

 

 

Sample Class Diagram

A sample UML Class diagram that shows multi-level inheritance.

Exit mobile version