Object oriented programming concepts-Session 2
Object oriented programming concepts-Session 2
nl
O
se
U
tre
en
Session: 2 C
h
ec
Object-oriented Design
pt
rA
Fo
O
Describe Responsibility-driven Design (RDD)
se
Explain Agents, Classes, and Instances
U
tre
Describe Methods, Responsibilities, and Modules
en
Explain Generalization, Specialization, and Patterns
Explain Coupling and Cohesion C
h
ec
pt
rA
Fo
U
the interfaces to it.
tre
en
C
h
Process of creating a system where objects coordinate
ec
O
analysis in the form of:
se
U
System
tre
Conceptual
Use cases Sequence
en
models
Diagrams (SSD)
C
h
ec
User Interface
pt
Data models
Documentation
rA
Fo
O
Defining classes and objects from conceptual diagrams
se
U
tre
Identifying the attributes of an object
en
C
Using design patterns to find a solution to a problem
h
ec
tre
en
Sequence Diagrams
C
h
ec
Class Diagrams
pt
rA
Fo
O
se
Based on delegation of responsibilities and
U
tre
executing the responsibilities
en
C
h
ec
pt
rA
Fo
nl
responsibility, the design team prepares small
O
index cards.
se
U
tre
en
C
h
ec
pt
rA
O
been defined that are as follows:
se
Communities of Agents
U
Classes and Objects
tre
Messages and Methods
en
Responsibilities
Modules C
h
Generalization and Specialization
ec
Patterns
pt
rA
nl
O
of interacting agents called objects.
se
U
Each object plays a unique role and provides services
tre
to or performs a task for the other members of the
en
community.
C
h
ec
pt
rA
Fo
O
wants to send a cake to a friend named Brian.
se
U
tre
en
C
h
ec
pt
rA
Fo
O
having common characteristics
se
U
The figure shows various objects arranged according to
tre
en
C
h
ec
pt
rA
Fo
O
se
Object can also be referred to as an instance of a class.
U
tre
The figure shows two objects of class Baker namely b1
en
and b2 and the value of Name for b1 is William and
that of b2 is Roger. C
h
ec
pt
rA
Fo
O
procedure to accomplish something
se
U
Message is a set of words, a phrase, or statement to
tre
convey something
en
C
The figure shows how the objects pass messages to
h
ec
O
methods and passing messages or arguments to the
se
methods to complete a task
U
tre
The message passing
en
O
responsibilities
se
U
The figure shows the responsibilities of various agents
tre
en
C
h
ec
pt
rA
Fo
nl
smaller units or modules
O
se
The figure shows the approximate time it took to Bob
U
to deliver the cake when he does everything himself.
tre
en
C
h
ec
pt
rA
Fo
O
was divided among other agents.
se
U
tre
en
C
h
ec
O
specialization.
se
U
tre
en
C
h
ec
pt
rA
Fo
O
to create a design
se
U
The figure shows the situation of a client making
tre
en
C
h
ec
pt
rA
Fo
O
about each other
se
U
Coupling can be loose or tight
tre
en
In tightcoupling
Loose coupling,
means
the a group
of components
components arewhich
largely
can be C
h
ec
operate independent
dependent on each other
of each
pt
other
rA
Fo
nl
focused it is on a specific task
O
se
The figures show a less cohesive component and a
U
highly cohesive component.
tre
en
C
h
ec
pt
rA
Fo
y
nl
delegation of responsibilities and determination of components
O
responsible for executing the responsibilities.
se
An object-oriented program is viewed as a community of
U
interacting agents called objects.
tre
A class is a structure that defines and encloses the data
members and methods pertaining to a particular entity. An
en
instance is one copy of the class.
C
The commonly used method of solving complex problems is to
h
divide the problem into smaller units called modules.
ec