Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

What is Object Diagram in UML?

Learn with Example


By Alyssa Walker Updated October 8, 2021

Say BYE To Long Design Cycle


Discover more about SOLIDWORKS with

personalized consultation from our local sales team.

Solidworks Visit Site

Before we learn Object Diagram, let’s


understand-

What is Class Diagram?


A class represents things that are put
together having common behavior. It is a
blueprint of an object-oriented system

Let us consider an exciting example of classes and objects. We all know cars like Ferrari,
Volkswagen, Mercedes, and Porsche, etc. These are all cars manufacturing companies. Here,
we can consider that a car is a class and Ferrari, Mercedes are the objects

Class Diagram Notation

In this tutorial, you will learn: twopercent.hk


Beauty Cosmetics
Open
discounter
What is Class Diagram?

What is Object Diagram in UML?


How to Draw Object Diagram
Purpose of Object Diagram
Applications of Object Diagram
Class Diagram Vs. Object Diagram

What is Object Diagram in UML?


An Object Diagram describes the instance of a class. It visualizes the particular functionality
of a system. The difference between the class and object diagram is that the class diagram
mainly represents the bird’s eye view of a system which is also referred to as an abstract
view.

Objects are the real-world entities whose behavior is defined by the classes. Objects are
used to represent the static view of an object-oriented system. We cannot define an object
without its class. Object and class diagrams are somewhat similar.

Notation of an Object Diagram:

Object Diagram Notation

Object Diagram Example


twopercent.hk
Beauty Cosmetics
Open
discounter
Object Diagram Example

The above UML object diagram contains two objects named Ferrari and BMW which belong
to a class named as a Car. The objects are nothing but real-world entities that are the
instances of a class.

1. PYTHON BASIC PROGRAMS ❯


2. ONLINE HOTEL RESERVATIONS ❯
3. TIME MANAGEMENT SYSTEMS ❯
4. SIMPLE PROJECT MANAGEMENT ❯
5. FREE FISHBONE DIAGRAM ❯
6. NETWORK DIAGRAM EXAMPLES ❯
Ad |
Business Focus

How to Draw Object Diagram


Below are the steps to draw Object Diagram in UML:

Step 1) Before drawing an object diagram, one should analyze all the objects inside the
system.
Step 2) The relations of the object must be known before creating the diagram.
Step 3) Association between various objects must be cleared before.
Steptwopercent.hk
4) An object should have a meaningful name that describes its functionality.
Beauty Cosmetics
Open
Stepdiscounter
5) An object must be explored to analyze various functionalities of it.
Purpose of Object Diagram

It is used to describe the static aspect of a system.


It is used to represent an instance of a class.
It can be used to perform forward and reverse engineering on systems.
It is used to understand the behavior of an object.
It can be used to explore the relations of an object and can be used to analyze other
connecting objects.

Applications of Object Diagram


Following are the applications of Object Diagram:

Object diagrams play an essential role while generating a blueprint of an object-


oriented system.
Object diagrams provide means of modeling the classes, data and other information as
a set or a single unit.
It is used for analyzing the online or offline system. The functioning of a system can be
visualized using object diagrams.

Class Diagram Vs. Object Diagram


Serial
Class Object
no.

It represents the behavior of a system


1 It represents static aspects of a system.
in real time.

It captures runtime changes of a


2 It doesn’t include dynamic changes.
system.

It never includes attributes or data It includes attributes and data values


3
values of an instance. of any instance.
twopercent.hk
ClassCosmetics

Beauty Diagram manipulates


Open the behavior
4 discounter Objects are instances of classes.
of objects.
o objects.

Summary

Class groups together things that share similar behavior.


A class represents a bird’s eye view of a system, i.e., an abstraction which is an object-
oriented programming concept.
An object represents a static view of an object-oriented system.
One class can refer to multiple classes.
A single class can have any number of objects.
Objects are related to one another because they share the same class.
The object of different classes can also be connected.

You Might Like:

UML Notation Tutorial: UML Diagram Symbol with Examples


Activity Diagram in UML: Symbol, Components & Example
UML Association vs Aggregation vs Composition with EXAMPLE
UML Tutorial PDF: Basics with Diagram (Download Now)
UML Diagram Cheat Sheet and Reference Guide

Prev Report a Bug Next

PLAY SONG

The Next Best Artist


NukeSmurtha # Flex Wisdom Rap

HEAR MORE

twopercent.hk
Beauty Cosmetics
Open
discounter

You might also like