0% found this document useful (0 votes)
10 views

Class and Object Diagram

Uploaded by

Selsha c.s
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Class and Object Diagram

Uploaded by

Selsha c.s
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

CLASS DIAGRAM AND

OBJECT DIAGRAM

By: SELSHA C S
CLASS DIAGRAM:

A class diagram shows a set of classes, interfaces, and collaborations and their
relationships.
A class diagram is a diagram describing the structure of a system.
Most common diagram found in modeling object-oriented systems.
Addresses the static design view of a system.
Class diagram that include active classes address the static process view of system.
● The top box has the class name.
● The middle one has the
attributes/properties/data members
● The lower one has the
behaviour/member
functions/methods.
HOW TO DRAW A CLASS DIAGRAM?

● The name of the class diagram should be meaningful to describe the aspect of the system.
● 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, as unnecessary
properties will make the diagram complicated.
● Use notes whenever required to describe some aspect of the diagram. At the end of the
drawing it should be understandable to the developer/coder.
● Finally, before making the final version, the diagram should be drawn on plain paper and
reworked as many times as possible.
WHERE TO USE CLASS DIAGRAM:

1. Describing the static view of the system.


2. Showing the collaboration among the elements of the static view.
3. Describing the functionalities performed by the system.
4. Construction of software applications using object oriented languages.
OBJECT DIAGRAM:

● Object diagram represents an instance of class diagram.


● Object diagram also represent static view of a system but this static view is a snapshot of a
system at a particular moment.
● Object diagram are used to render a set of objects and their relationships as an instance.
● Object diagram is closer to the actual system behaviour.
● The purpose of object diagram :
○ Forward and reverse engineering
○ Object relationships of a system
○ Static view of an interaction
○ Understand object behaviour and their relationship from practical perspective.
HOW TO DRAW AN OBJECT DIAGRAM:

● First, analyze the system and decide which instances have important data and association.
● Second, consider only those instances, which will cover the functionality.
● Third, make some optimization as the number of instances are unlimited.
Before drawing an object diagram, the following things should be remembered and understood
clearly −
● Object diagrams consist of objects.
● The link in object diagram is used to connect objects.
● Objects and links are the two elements used to construct an object diagram.
After this, the following things are to be decided before starting the construction
of the diagram −
● The object diagram should have a meaningful name to indicate its purpose.
● The most important elements are to be identified.
● The association among objects should be clarified.
● Values of different elements need to be captured to include in the object
diagram.
● Add proper notes at points where more clarity is required.
WHERE TO USE OBJECT DIAGRAMS:

● Making the prototype of a system.


● Reverse engineering.
● Modeling complex data structures.
● Understanding the system from practical perspective.
THANK YOU

You might also like