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

OOAD Short Note

The document discusses object oriented analysis and design (OOAD). It describes OOAD as a technical approach for analyzing and designing software that applies object-oriented concepts and visual modeling throughout the development lifecycle. The key advantages of OOAD include simplicity, modularity, modifiability, and extensibility. The document outlines fundamental OOAD concepts like classes, objects, encapsulation, inheritance, and polymorphism.

Uploaded by

iamasniya07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

OOAD Short Note

The document discusses object oriented analysis and design (OOAD). It describes OOAD as a technical approach for analyzing and designing software that applies object-oriented concepts and visual modeling throughout the development lifecycle. The key advantages of OOAD include simplicity, modularity, modifiability, and extensibility. The document outlines fundamental OOAD concepts like classes, objects, encapsulation, inheritance, and polymorphism.

Uploaded by

iamasniya07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

OBJECT ORIENTED ANALISIS AND DESIGN

NSJ ONLINE ACADEMY 1


OBJECT ORIENTED ANALISIS AND DESIGN

Software development problems

• Development of complex software systems

• Represent real life entities in software

• Development of software in a short time (productivity)

– Reusable components

• Developing extensible software for future changes

Software Development Methodology

A Software Development Methodology is a framework used to structure, plan, and control the software
development process

• Steps in software development process

1. Systems analysis, requirements definition

2. Systems design

3. Development

4. Integration and testing

5. Acceptance, installation, deployment

6. Maintenance

Methodology Approaches in System Development

• Traditional Approach (Structured Approach)

• Object Oriented Approach

Advantages of using Methodology Approaches

• Clear understanding of the task ahead

• Identify drawbacks earlier

• Provide better estimates

• Deliver stable systems

NSJ ONLINE ACADEMY 2


OBJECT ORIENTED ANALISIS AND DESIGN

• Allowing for sufficient time to make adjustments.

• Keep the customer informed

Traditional Approach (Structured Approach)

Structured Analysis and Design Technique (SADT) is a software engineering methodology for describing
systems as a hierarchy of functions.

SADT includes

Structured Analysis (E.g.:Data Flow Diagrams)

Structured Design(E.g.:Structure Chart)

Structured Programming (E.g.:Sequence, Selection, Iteration)

Object Oriented approach

It is an approach to system development that views information system as a collection of interacting


objects that work together to accomplish task.

OOAD includes

Object Oriented Analysis

Object Oriented Design

Object Oriented Programming

Object Oriented Analysis and Design

Technical approach for analyzing and designing software applying the object-orientated concepts and
visual modeling throughout the development life cycles to better stakeholder communication and
product quality

Advantages of OOAD

• Simplicity

• Modularity (easy to partition)

• Modifiability

NSJ ONLINE ACADEMY 3


OBJECT ORIENTED ANALISIS AND DESIGN

• Extensibility (easily upgraded)

• Maintainability

OOAD Concepts

• Class

• Object

• Encapsulation

• Abstraction

• Inheritance

• Polymorphism

• Message passing

• Dynamic binding

Classes & Objects

Constructors

Constructors are special member functions of any class, which are invoked at the moment an instances
of the class are created. They are special functions that have the same name as their class.

NSJ ONLINE ACADEMY 4


OBJECT ORIENTED ANALISIS AND DESIGN

Have the same name as the class.

It may take arguments.

It cannot return a value [including void].

Constructors

Circle::
Circle()
{

• Parameterized Constructor

Circle::Circle(int r)
{
radius = r;

Destructors
}
• Special member function

• Having same name as class

• Preceded with tilde (~)

• No arguments

• No return value

• Cannot be overloaded

• Invoked before system reclaims object’s memory

• Used in reusing memory for new objects

Pointers

Memory location which hold the address of another memory location/ variable

NSJ ONLINE ACADEMY 5


OBJECT ORIENTED ANALISIS AND DESIGN

Access Specifies

• Public - members declared as Public are accessible from outside the Class through an object of
the class.

• Protected - members declared as Protected are accessible from outside the class BUT only in a
class derived from it.

• Private - members are only accessible from within the class.

Encapsulation

Wrapping up data and functions into single unit

Advantages

Restrict access to its internal data

Easy maintenance

Abstraction

Hiding complexity by hiding unnecessary details

Advantages

Restrict access to its internal operations

NSJ ONLINE ACADEMY 6


OBJECT ORIENTED ANALISIS AND DESIGN

Hiding implementation complexity

Provide simple interface

Abstraction

• Abstract classes cannot be used to instantiate objects

• Virtual is keyword Abstract method

Ex-:

virtual double getVolume() = 0;

• Once an abstract method is created inside the class,

that class becomes an abstract class.

Inheritance

Forming a new class from an existing class as new class receive the old class information

Advantages

Code reusability

Reduce development time and effort

Provide specialization

Extendibility

Can extend an already made classes by adding new features

NSJ ONLINE ACADEMY 7


OBJECT ORIENTED ANALISIS AND DESIGN

Polymorphism

Polymorphism is the ability of an object to take on many forms.

Static ( Compile time ) Polymorphism

Method Overloading

2.Method Overriding

Overloading

• Ability to create multiple methods of the same name with different implementations.

• Use deferent parameters

Method Overriding

• Same name with the same parameters but can not be done be with in one class.

• Inheritance should be the used.

Allows a subclass or child class to provide a specific implementation of a method that is already provided
by one of its super classes or parent classes

Operator Overloading

• Building Data Type int,Double,…etc

• User Define Data Type (create a class after we can create a variable as class name

• Example class_name Varible_Name.

• The mechanism of giving such special meaning to an operator is called operator overloading.

• Used (+),(-) operator to special thin user difine data type as with - Varible_Name

example -: Object is obj

Operator data type as -obj

NSJ ONLINE ACADEMY 8


OBJECT ORIENTED ANALISIS AND DESIGN

• The following operator can not be overloaded

1)Class member access (.,*)

2)Scope resolution (::)

3)Sizeof

4)conditional operator(?,:)

5)Assigment (=)

6)Funtion ()

7)Subcription operator ([])

8)Class member access operator (->,_)

Dynamic ( Run time ) Polymorphism

• Called as late binding

• Memory allocated at runtime when we used dynamic (memory allocated at runtime)

Virtual Functions

• A class that contain pure virtual function is called as Abstract class

• Virtual void Method_Name()=0;

• No Function body

• Can not create object of Abstract class

• Can create pointer Variable

Benefits of OOP

• Eliminate redundant code

• Developing extensible software for future changes

• Encapsulation and abstraction helps to develop secure programs

• Software complexity can easily manage

Structural UML diagrams

NSJ ONLINE ACADEMY 9


OBJECT ORIENTED ANALISIS AND DESIGN

• Class diagram

• Package diagram

• Object diagram

• Component diagram

• Composite Structure diagram

• Deployment diagram

Behavioral UML

• Use case diagram

• Activity diagram

• Sequence diagram

• State diagram

Use Case diagram

NSJ ONLINE ACADEMY 10


OBJECT ORIENTED ANALISIS AND DESIGN

Advantages of Use Case diagram

• Easy to understand by non technical people

• Facilitate encouraging user involvement

• Used to gathering system requirements from users

• Used to describe a new design to stakeholders

• Helpful in identifying project scope

Use Case Diagram Components

Actor
Inheritance

NSJ ONLINE ACADEMY 11

Use case Inclusion Of a


<<include>>
Use case by Another
OBJECT ORIENTED ANALISIS AND DESIGN

Actor

• The User of the system is usually the Actor

– The Actor is shown sending and receiving messages to and from the System

• External Devices may also be Actors

– e.g. ATMs, Keypads, Printers

• External Systems may also be Actors

– e.g. Bank

Actor Variations

NSJ ONLINE ACADEMY 12


OBJECT ORIENTED ANALISIS AND DESIGN

– Primary

• The first or main Actor who uses the system

• The main Actor who benefits from the system

• e.g. Customer, Patient, Doctor

– Secondary Actor

• The Actor who derives indirect benefits from or uses the system

• e.g. Branch manager

Identifying Use Cases

• Actor based

– Specify the actors which will use the system and which other systems must interact with
it.

– For each actor, identifying the processes they initiate or participate

• Event based

– Identify the external events that a system must respond to Relate the events to actors
and use cases

Relationships

• Association

• Extend

• Include

• Depends on

Generalization

Associations

– Drawn between actors and use cases to show that an actor carries out a use case

– Solid line connecting the actor and the use case

NSJ ONLINE ACADEMY 13


OBJECT ORIENTED ANALISIS AND DESIGN

<<Extend >>

– Extends the functionality of the original use case

– Arrow headed (either solid/dashed) line

– Shows optional behavior

<<Include>>

– Include relationship is modelled between the use cases when a use case includes the
behavior sequence of another use case.

– The include relationship is presented with a dashed arrow.

– The arrow head is pointing towards the included use case.

NSJ ONLINE ACADEMY 14


OBJECT ORIENTED ANALISIS AND DESIGN

<<Depends on>>

– Indicating that one use case cannot be performed until another use case has been
performed

Generalization

• Relation between abstract use case and specialized use case

• The parent use case contains the common behavior sequence .

• the child use case contains the refined features. Relation between use cases

NSJ ONLINE ACADEMY 15


OBJECT ORIENTED ANALISIS AND DESIGN

Scenario

Scenario consists of

Normal flow

Alternate flow

Sub flows

Exceptions

Normal Flow

The basic flow cover events what "normally" happens when the use case is performed.

Sub Flow

Sub-flows elaborate the details of the steps in the normal flow

Alternate Flow

Alternate flow elaborate optional behaviors

Exceptions

Exceptional flow elaborate failures which not achieving the use case's goal

The Process of Modeling Use Cases

Step 1: Identify business external systems or users

NSJ ONLINE ACADEMY 16


OBJECT ORIENTED ANALISIS AND DESIGN

– Actors

Step 2: Identify Business Requirements

– Use Cases

Step 3: Construct Use‐Case Model

– Diagram

Step 4: Document Business Requirement

– Use‐case Narratives

• A class diagram

– Represents a view of the class structure of a system in the logical view of a system

• Classes

• Relationships among Classes

– During analysis

• to indicate the common roles and responsibilities of the entities that provide
the system’s behavior

– During design

to capture the structure of the classes that form the system’s architecture

NSJ ONLINE ACADEMY 17


OBJECT ORIENTED ANALISIS AND DESIGN

Class

Collection of group of things that have the same attributes and the same behaviors

Class Diagram

• Class diagram describes the types of objects in the system and the various kinds of static
relationships that exist among them.

• It also shows the attributes and services of a class and the constraints that apply to the way
objects are connected.

The Class Notation

• The representation of a Class

– Three compartments

• Class name

• Attributes

• Operations

– General Notation:

NSJ ONLINE ACADEMY 18


OBJECT ORIENTED ANALISIS AND DESIGN

Major Components

• Name

– All words start in capital

– No spaces

• List of attributes

– No capitals in first word

– All other words only start with capital

– No space

• List of methods

– No capitals in first word

– All other words only start with capital

– No space

– Parentheses at the end

• Function signature

– acceptCloths(c:String):int

• Function name acceptCloths

• Parameter : String type c

• Return value :type is int

NSJ ONLINE ACADEMY 19


OBJECT ORIENTED ANALISIS AND DESIGN

Visibility

• + Public

• ‐ Private

• # Protected

• ~ Package

Stereotypes and Classes

NSJ ONLINE ACADEMY 20


OBJECT ORIENTED ANALISIS AND DESIGN

Boundary Classes

– User interface classes

– System interface classes

– Device interface classes

Entity Classes

• Fundamental building block which perform internal tasks

• Represent real world entity

• They correspond to database table

Control Classes

• Objects that mediate between boundaries and entities.

• Typically one control class per use case

Relationships

• Association

• Aggregation/Composition

• Generalization/Inheritance

• Dependency

NSJ ONLINE ACADEMY 21


OBJECT ORIENTED ANALISIS AND DESIGN

Associations

Multiplicity

1 Exactly one

0..* Zero or more

1..* One or more

0..1 Zero or one

5..8 Specific Range (5,6,7 or 8)

Aggregation (Shared Association

NSJ ONLINE ACADEMY 22


OBJECT ORIENTED ANALISIS AND DESIGN

Aggregation

Composition(Not-Shared Association)

Inheritance

NSJ ONLINE ACADEMY 23


OBJECT ORIENTED ANALISIS AND DESIGN

Generalization/ Specialization

• Generalization

– Create super class encapsulate structure and behavior common to number of classes

• Specialization

– Create sub class that represent refinement to super class.

– Specific structure and behavior are added to sub classes

NSJ ONLINE ACADEMY 24


OBJECT ORIENTED ANALISIS AND DESIGN

Object Diagram

Object diagram is an instance of a class diagram; it shows a snapshot of the detailed state of a system at
a point in time

Component Diagrams

Component diagrams are used in modeling the physical aspects of object-oriented systems in
representation of the dependencies and interactions between software components, for visualizing,
specifying, and documenting components

NSJ ONLINE ACADEMY 25


OBJECT ORIENTED ANALISIS AND DESIGN

Assembly Connector – Interface

Ports

Provided interface

NSJ ONLINE ACADEMY 26


OBJECT ORIENTED ANALISIS AND DESIGN

Subsystem

State Chart Diagram

❖ State chart diagram is used to capture the dynamic aspect of a system.

❖ State machine diagrams are used to represent the behavior of an application.


NSJ ONLINE ACADEMY 27
OBJECT ORIENTED ANALISIS AND DESIGN

❖ An object goes through various states during its lifespan.

❖ The lifespan of an object remains until the program is terminated.

❖ The object goes from multiple states depending upon the event that occurs within the object.

❖ Each state represents some unique information about the object.

❖ The primary purpose of a state chart diagram is to model interactive systems and define each
and every state of an object.

❖ State chart diagrams are designed to capture the dynamic behavior of an application system.

These diagrams are used to represent various states of a system and entities within the system

Notation and Symbol for State Machine

Initial state

The initial state symbol is used to indicate the beginning of a state machine diagram.

Final state

This symbol is used to indicate the end of a state machine diagram.

Decision box

NSJ ONLINE ACADEMY 28


OBJECT ORIENTED ANALISIS AND DESIGN

It contains a condition. Depending upon the result of an evaluated guard condition, a new path
is taken for program execution.

Transition

A transition is a change in one state into another state which is occurred because of some event.
A transition causes a change in the state of an object.

Characteristics of a state

❖ The name of a state can also be placed outside the rectangle.

❖ This can be done in case of composite or submachine states.

❖ One can either place the name of a state within the rectangle or outside the rectangle in a
tabular box.

❖ One cannot perform both at the same time.

❖ A state can be either active or inactive.

❖ When a state is in the working mode, it is active, as soon as it stops executing and transits into
another state, the previous state becomes inactive, and the current state becomes active.

Types of State

Unified Modeling Language defines three types of states:

Simple state

◦ They do not have any sub state.

Composite state

◦ These types of states can have one or more than one sub state.

◦ A composite state with two or more sub states is called an orthogonal state.

Submachine state

◦ These states are semantically equal to the composite states.

◦ Unlike the composite state, we can reuse the submachine states.

Examples

There are a total of two states, and the first state indicates that the OTP has to be entered first.

After that, OTP is checked in the decision box, if it is correct, then only state transition will occur,
and the user will be validated.

NSJ ONLINE ACADEMY 29


OBJECT ORIENTED ANALISIS AND DESIGN

If OTP is incorrect, then the transition will not take place, and it will again go back to the
beginning state until the user enters the correct OTP as shown in the above state machine
diagram example.

Activity Diagram

NSJ ONLINE ACADEMY 30


OBJECT ORIENTED ANALISIS AND DESIGN

This is a Behavior Diagram

NSJ ONLINE ACADEMY 31


OBJECT ORIENTED ANALISIS AND DESIGN

NSJ ONLINE ACADEMY 32


OBJECT ORIENTED ANALISIS AND DESIGN

Composite structure Diagram

Sequence Diagrams

NSJ ONLINE ACADEMY 33


OBJECT ORIENTED ANALISIS AND DESIGN

A sequence diagram is representation of object interactions arranged in time sequence . It depicts the
objects and classes involved in the scenario and the sequence of messages exchanged between the
objects

Message

NSJ ONLINE ACADEMY 34


OBJECT ORIENTED ANALISIS AND DESIGN

Messages types

• Synchronous message

– A synchronous message is used when the sender waits for the receiver to process the
message and return before carrying on with another message.

– Use solid arrowhead

• Asynchronous message

– A synchronous message is used when the message caller does not wait for the receiver
to process the message and return before sending other messages to other objects.

– Use line arrowhead

• Return message

– A return message is used to indicate that the message receiver is done processing the
message and is returning control over to the message caller.

– Use dashed line arrowhead

Activation Bar

NSJ ONLINE ACADEMY 35


OBJECT ORIENTED ANALISIS AND DESIGN

– Activation bar or focus of control is the box placed on the lifeline. It is used to indicate
that an object is active (or instantiated) during an interaction between two objects. The
length of the rectangle indicates the duration of the objects staying active.

– Drawn when object method is on method stack waiting for other objects to finish,

Indicating method calls

Creation message

NSJ ONLINE ACADEMY 36


OBJECT ORIENTED ANALISIS AND DESIGN

Destruction/Deletion

Reflexive message

NSJ ONLINE ACADEMY 37


OBJECT ORIENTED ANALISIS AND DESIGN

Conditions and loops

• Fragment/Frame

– Section of interactions between objects

– It is used to show complex interactions such as alternative flows and loops in a more
structured way

– Fragment operator

– Left top corner

– Specifies what sort of a fragment it is

NSJ ONLINE ACADEMY 38


OBJECT ORIENTED ANALISIS AND DESIGN

Stereotypes

NSJ ONLINE ACADEMY 39


OBJECT ORIENTED ANALISIS AND DESIGN

NSJ ONLINE ACADEMY 40


OBJECT ORIENTED ANALISIS AND DESIGN

Subscribe Us on Youtube

www.youtube.com/@nsjonlineacademy

Video 01

https://www.youtube.com/watch?v=TKesbyZHWog&list=PLXVeQCT5AgYtGYFVbZyNSL5_MtRm6n7Qz&i
ndex=1

Video 02

https://www.youtube.com/watch?v=GJqxETeOxzQ&list=PLXVeQCT5AgYtGYFVbZyNSL5_MtRm6n7Qz&in
dex=2

Rapid Revision 01

https://www.youtube.com/watch?v=0nnjefTC_Zc&list=PLXVeQCT5AgYtGYFVbZyNSL5_MtRm6n7Qz&ind
ex=4

Rapid Revision 02

https://www.youtube.com/watch?v=e47YnhN8EKM&list=PLXVeQCT5AgYtGYFVbZyNSL5_MtRm6n7Qz&i
ndex=5

NSJ ONLINE ACADEMY 41

You might also like