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

Classes & Object Diagram

The document discusses class and object diagrams in UML. It defines classes as logical constructs that do not occupy space, while objects are real-world entities that do occupy space. An object is an instance of a class. The document discusses the structure of classes and objects, and the relationships between them like association, aggregation, and generalization. It explains the purpose, benefits, and process for creating class and object diagrams to model the static design of a system.

Uploaded by

PUBG Noob
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Classes & Object Diagram

The document discusses class and object diagrams in UML. It defines classes as logical constructs that do not occupy space, while objects are real-world entities that do occupy space. An object is an instance of a class. The document discusses the structure of classes and objects, and the relationships between them like association, aggregation, and generalization. It explains the purpose, benefits, and process for creating class and object diagrams to model the static design of a system.

Uploaded by

PUBG Noob
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Class & Object

Diagram
Group 3 (Roll no - 147 - 156)
UML Diagram

1 Structural ( 2 Behavioural (d
static) ynamic)

- Classes

- Object

Typical definition of classes & object


Classes - Logical Construct, No Space

Object - real world entity, Occupies Space

An object is an instance of a class.


Structure

Class Object

Class Name Object Name : Class Name


Class Attribute Attribute
Class operations (functions)
: Class Name
Attribute
Anonymus Object
Feasibility Type

+ public
- private
# protected

Relation
Type
1. Association
2. Dependency - - - - - - - ->
3. Aggregation (not strongly dependent)
4. Composition (strongly dependnet)
5. Generalization
CONTENTS

1 What? 3 Benefit

2 Purpose 4 How?
Purpose of a class Diagram

It analyses and designs a static view of an application.


It describes the major responsibilities of a system.
It is a base for component and deployment diagrams.
It incorporates forward and reverse engineering.
Benefits of a class Diagram

It can represent the object model for complex systems.


It reduces the maintenance time by providing an overview of how an
application is structured before coding.
It provides a general schematic of an application for better understanding.
It is helpful for the stakeholders and the developers.
How to draw a class Diagram

To describe a complete aspect of the system, it is suggested to give a


meaningful name to the class diagram.
The objects and their relationships should be acknowledged in advance.
The attributes and methods (responsibilities) of each class must be known.
Notes can be used as and when required by the developer to describe the
aspects of a diagram.
The diagrams should be redrawn and reworked as many times to make it
correct before producing its final version.
Example
0, 1, 0.....* OR *, 1......* , Exact Number
Purpose of an Object Diagram

The purpose of a diagram should be understood clearly to implement it


practically.
The purposes of object diagrams are similar to class diagrams.
It means the object diagram is closer to the actual system behavior.
The purpose is to capture the static view of a system at a particular moment.
Forward and reverse engineering.
Object relationships of a system
Static view of an interaction.
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.
Where to draw an Object Diagram

Object diagrams can be imagined as the snapshot of a running system at a


particular moment. Let us consider an example of a running train.
Now, if you take a snap of the running train then you will find a static picture
of it having the following:-
1.A particular state which is running.
2.A particular number of passengers. which will change if the snap is taken
in a different time
THANKS

You might also like