You are on page 1of 2

1/5/12 UML - Class Diagram

Home References Discussion Forums About TP

Advertisement
UML Cla Diag am

...
O e ie :
Web Thi Si e
The class diagram is a static diagram. It represents the static view of an application. C lass
diagram is not only used for visualizing, describing and documenting different aspects of a
UML T o ial system but also for constructing executable code of the software application.

UML - Home The class diagram describes the attributes and operations of a class and also the constraints
imposed on the system. The class diagrams are widely used in the modelling of object oriented
UML - Overview
systems because they are the only UML diagrams which can be mapped directly with object
UML - Building Blocks oriented languages.
UML - Architecture
The class diagram shows a collection of classes, interfaces, associations, collaborations and
UML - Modeling Types constraints. It is also known as a structural diagram.
UML - Basic Notations
UML - Standard Diagrams P po e:
UML - Cla Diag am
The purpose of the class diagram is to model the static view of an application. The class
UML - Object Diagram diagrams are the only diagrams which can be directly mapped with object oriented languages
UML - C omponent Diagram and thus widely used at the time of construction.
UML - Deployment Diagram The UML diagrams like activity diagram, sequence diagram can only give the sequence flow of
UML - Use C ase Diagram the application but class diagram is a bit different. So it is the most popular UML diagram in the
coder community.
UML - Interaction Diagram
UML - Statechart Diagram So the purpose of the class diagram can be summarized as:
UML - Activity Diagram Analysis and design of the static view of an application.
UML - Summary
Describe responsibilities of a system.
UML 2.0 O e ie Base for component and deployment diagrams.
UML 2.0 - Overview Forward and reverse engineering.

UML U ef l Re o ce Ho od a Cla Diag am?


UML Useful Resources
C lass diagrams are the most popular UML diagrams used for construction of software
UML Knowledge Test applications. So it is very important to learn the drawing procedure of class diagram.

C lass diagrams have lot of properties to consider while drawing but here the diagram will be
UML Tool & U ili ie
considered from a top level view.
UML Tools & Utilities
C lass diagram is basically a graphical representation of the static view of the system and
represents different aspects of the application. So a collection of class diagrams represent the
Selec ed Reading whole system.

C omputer Glossary The following points should be remembered while drawing a class diagram:
Who is Who
The name of the class diagram should be meaningful to describe the aspect of the
system.

2 0 1 1 T utorials P oint.C O M Each element and their relationships should be identified in advance.

Responsibility (attributes and methods) of each class should be clearly identified.

For each class minimum number of properties should be specified. Because unnecessary
properties will make the diagram complicated.

Use notes when ever required to describe some aspect of the diagram. Because at the
end of the drawing it should be understandable to the developer/coder.

Finally, before making the final version, the dia gram should be drawn on plain paper and
rework as many times as possible to make it correct.

Now the following diagram is an example of an Order S stem of an application. So it describes a


particular aspect of the entire application.

First of all Order and Customer are identified as the two elements of the system and they
have a one to man relationship because a customer can have multiple orders.

We would keep Order class is an abstract class and it has two concrete classes
(inheritance relationship) SpecialOrder and NormalOrder.

The two inherited classes have all the properties as the Order class. In addition they have
.tutorialspoint.com/uml/uml_class_diagram.htm 1/2
1/5/12 UML - Class Diagram
addi ional f nc ion like dispatch () and recei e ().

So he follo ing cla diag am ha been d a n con ide ing all he poin men ioned abo e:

Whe e o e Cla Diag am ?


C la diag am i a a ic diag am and i i ed o model a ic ie of a em. The a ic ie
de c ibe he ocab la of he em.

C la diag am i al o con ide ed a he fo nda ion fo componen and deplo men diag am .
C la diag am a e no onl ed o i ali e he a ic ie of he em b he a e al o
ed o con c he e ec able code fo fo a d and e e e enginee ing of an em.

Gene all UML diag am a e no di ec l mapped i h an objec o ien ed p og amming


lang age b he cla diag am i an e cep ion.

C la diag am clea l ho he mapping i h objec o ien ed lang age like Ja a, C ++ e c. So


f om p ac ical e pe ience cla diag am i gene all ed fo con c ion p po e.

So in a b ief, cla diag am a e ed fo :

De c ibing he a ic ie of he em.

Sho ing he collabo a ion among he elemen of he a ic ie .

De c ibing he f nc ionali ie pe fo med b he em.

C on c ion of of a e applica ion ing objec o ien ed lang age .

Metatrader Do nload www.Alpari.co.uk


Practice Currenc Trading Platform Download Now
Free

.tutorialspoint.com/uml/uml_class_diagram.htm 2/2