0% found this document useful (0 votes)
11 views10 pages

Unit 1

Object-Oriented Analysis and Design (OOAD) is a methodology for developing applications by identifying business objects and defining their interactions. It contrasts with traditional approaches by focusing on objects and classes, promoting reusability, and simplifying the development process. Key concepts include encapsulation, inheritance, polymorphism, and the relationships between objects, which enhance adaptability and maintainability in software development.

Uploaded by

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

Unit 1

Object-Oriented Analysis and Design (OOAD) is a methodology for developing applications by identifying business objects and defining their interactions. It contrasts with traditional approaches by focusing on objects and classes, promoting reusability, and simplifying the development process. Key concepts include encapsulation, inheritance, polymorphism, and the relationships between objects, which enhance adaptability and maintainability in software development.

Uploaded by

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

Unit – 1 Introduction

What is Object-Oriented Analysis and Design

OOA: we find and describe business objects or concepts in the problem domain
OOD: we define how these software objects collaborate to meet the requirements,
attributes and methods.
OOP: Implementation: we implement the design objects in, Java, C++, C#, etc.
Definition: Object-oriented analysis and design (OOAD) is a popular technical approach
for analyzing, designing an application, system, or business by applying the object oriented
paradigm and visual modelling throughout the development life cycles for better
communication and product quality.
Software development: It is dynamic and always undergoing major change.
Systems development refers to all activities that go into producing an information
systems solution. Systems development activities consist of systems analysis, modelling, design,
implementation, testing and maintenance.
A software development methodology is a series of processes describe how the work
is to be carried out to achieve the original goal based on the system requirements.
TWO ORTHOGONAL VIEWS OF THE SOFTWARE
Two Approaches,
Traditional Approach
Objected-Oriented Approach
Traditional Approach: Here Algorithms + Data structures = Programs. “A software
system is a set of mechanisms for performing certain actions on certain data.”
Difference between Traditional and Object Oriented Approach

Traditional Approach Object oriented Approach

Collection of procedures Combination of data and functions

Focuses on function and procedures Focuses on object, classes, modules


different styles and methodologies that can be easily replaced, modifies
for each step of process and reused

Moving from one phase to another Moving from one phase to another
phase is complex phase is easier

Increases complexity Reduce complexity and redundancy

Increases duration of the project Decreases duration of the project


Object- oriented systems Development methodology:-

Object-Oriented development offers a different model from the traditional software


development approach, which is based on functions and procedures.
In an object-oriented system, everything is an object and each object is responsible for
itself. A windows object is responsible for things like opening, sizing, and closing itself.
Why an Object Orientation?
The systems are easier to adapt to changing requirements, easier to maintain, more
robust, and promote greater design and code reuse. Object-oriented development allows us to
create module of functionality.
Here or some reasons why object- Orientation works:
Higher level of abstraction. The top-down approach supports abstraction at the function
level. The Object-oriented approach supports abstraction at the object level. Since
objects encapsulate both data (attributes) and functions (methods), they work at a higher
level of abstraction.
Seamless transition among different phases of software development. The traditional
approach to software development requires different styles and methodologies for each
step of the process.
Encouragement of good programming techniques. A class in an object-oriented system
carefully delineates between its interface (specifications of what the class can do) and
the implementations of that interface (how the class does what it does).
Promotion of reusability. Objects are reusable because they are modelled directly out of a
real-world problem domain. Each object stands by itself or within a small circle of peers
(other objects).
Object Basics: Objects:
The term Object means a combination of data and logic that represents some real
world entity. When developing an object – oriented application, two basic questions always
arise: What objects does the application need?
What functionality should those objects have?

OBJECTS ARE GROUPED IN CLASSES


A class is a specification of structures (instance variables), behaviour (methods), and
inheritance for objects.
There may be many different classes.
Object state and properties (attributes):- Properties represent the state of an object.
Example: the properties of a car, such as color, manufacturer, and cost, are abstract descriptions.
The attributes of a Car object.

Car

Cost
Color
Make
Model

For color, we could choose to use a sequence of characters such as red, etc.
Behavior (Object Behavior and methods);-
We can drive a car, we can ride an elephant, or the elephant can eat a peanut. Each of
these statements is a description of the object’s behavior. In the object model, object behaviour
is described in methods or procedures. A method implements the behavior of an object.
Messages (Objects respond to messages):
An object’s capabilities are determined by the methods defined for it. Methods
conceptually are equivalent to the functions definitions used in procedural languages. Objects
perform operations in response to messages. For example, when you press on the brake pedal of
a car, you send a stop message to the car object.
Messages essentially are non specific function calls: we would send a draw message to
a chart when we want the chart to draw itself. A message is different from a subroutine call,
since different objects can respond to the same message in different ways. For example, cars,
motorcycles, and bicycles will all respond to as top message, but the actual operations
performed are object specific.
Methods are similar to functions, procedures, or sub-routine in more traditional
programming languages, such as COBAL, Basic, or C. The methods and functions differ,
however, is in how they are invoked.
Figure: Objects respond to messages according to methods defined in its class.
Brake
Car Object
Information Hiding (and Encapsulations):- Information hiding is the principle of concealing
the internal data and procedures of an object and providing an interface to each object in such a
way to reveal as little as possible about its inner workings.
On object is said to encapsulate the data and a program. This means that user cannot see the
inside of the object “capsule,” but can use the object by calling the object’s methods.
Encapsulation or information hiding is a design goal of an object-oriented system.
Rather than allowing an object direct access to another object’s data, a message is sent to the
target object requesting information.
Another issue is per-object or per-class protection. Inner-class protection, the most
common form (e.g.,Ada,C++,Eiffel),class methods can access any object of that class and not
just the receiver. In per-object protection, methods can access only the receiver.
A car engine is an example of encapsulation.
CLASS HIERARCHY:- An object-oriented system organizes classes into a sub class – super
class hierarchy. Different behaviours are used as the basics for making distinctions between
classes and subclasses. At the top of the Class hierarchy are the most general classes and at the
bottom are the most specific.
A subclass inherits all of the properties and methods defined in its superclass.

Motor Vehicles

Bus Truck Car

Mini bus tourist bus Lorry load truck ford maruti

A car class defines how a car behaves. The ford class defines the behavior of ford class.
Formal or abstract classes have no instances but define the common behaviours that
can be inherited by more specific classes.
In some object-oriented languages, the terms superclass and subclasses are used instead
of base and derived.
Inheritance:- Inheritance is the property of object-oriented systems that allows objects to be
built from other objects. Inheritance allows explicitly taking advantage of the commonality of
objects when constructing new classes. Inheritance is a relationship between classes where one
class is the parent class of another (derived) class. The parent class is also known as the base
class or super class.
For example the car class defines the general behaviour of cars. The ford class inherits
the general behavior from the car class and adds behavior specific to fords.
Vehicle

Car

Ford

Mustang Taurus Thunderbird

Dynamic inheritance allows objects to change and evolve over time. Since base classes
provide properties and attributes for objects, changing base classes changes the properties and
attributes of a class.
More specifically, dynamic inheritance refers to the ability to add, delete, or change
parents form objects (or classes) at run time.
Multiple inheritance:-
Some object-oriented systems permit a class to inherit its state (attributes) and
behaviors from more than one super class. This kind of inheritance is referred to as Multiple
Inheritance.

POLYMORPHISM:-
Poly means “many” and morph means “form”. In the context of object-oriented
systems, it means objects that can take on or assume many different forms. Polymorphism
means that the same operation may behave differently on different classes.
Booch defines polymorphism as the relationship of objects of many different classes by
some common super class.
Object Relationships
• There are two kinds of Relationships
• Generalization (parent-child reationship)
• Association (link b/w objects/class)
• Associations can be further classified as
• Aggregation (whole/part of relationship)
Composition (strong form of aggregation)
OO Relationships: Generalization

Associations represent the relationship between objects and classes. For example, in the
statement “a pilot can fly planes”(below figure), the italicized term is an association.

Planes
Pilot
Can fly flown by

Associations are bidirectional; It means they can be traversed in both directions,


perhaps with different connotations. The direction implied by the name is the forward directions;
the opposite direction is the inverse direction. For example, can fly connects a pilot to certain
airplanes. The inverse of can fly could be called is flown by.
An important issue in association is cardinality, which specifies how many instances
of one class may relate to a single instance of an associated class.
Consumer- Producer Association
A special form of association is a consumer – producer relationship, also known as a
client-server association or a use relationship. The consumer – producer relationship can be
viewed as one-way intersection: One object requests the service of another object.
Aggregations Aggregation and object containment):- Each object has an identity; one object
can refer to other objects. This is known as aggregation, where an attribute can be an object
itself. For instance, a car object is an aggregation of engine, seat, wheels, and other objects.
Identity (Object and identity):-

A special feature of object – oriented system is that every object has its own unique
and immutable identity. An object’s identity comes into being when the object is created and
continues to represent that object from then on. This identity never is confused with another
object, even if the original object has been deleted.

In an object system, object identity often is implemented through some kind of object
identifier (OID) or unique identifier (UID).
Dynamic Binding (Static and Dynamic Binding):-

The process of determining (dynamically) at run time which functions to invoke is


termed dynamic binding.
Making this determination earlier, at compile time, is called static binding.
Static binding optimizes the calls; dynamic binding occurs when polymorphic calls are
issued.
Dynamic binding allows some methods invocation decisions to be deferred until the
information is known.
Persistence (Object Persistence):-

Objects have a life time. They are explicitly created and can exist for a period of time
that, traditionally, has been the duration of the process in which they were created. A filer or a
database can provide support for objects having a longer life line longer than the duration of the
process for which they were created.
From a language perspective, this characteristic is called object persistence.
An object can persist beyond application session boundaries, during which the object is
stored in a file or a database, in some file or database form. The object can be retrieved in
another application session and will have the same state and relationship to other objects as at
the time it was saved. The life time of an object can be explicitly terminated.
Meta-Classes

Is a class an object? A class is an object; a class belongs to a class called a meta-class,


or a class of classes.
For example, classes must be implemented in some way; perhaps with dictionaries for
methods, instances, and parents and methods to perform all the work of being a class. This can
be declared in a class named meta-class.
The meta-class also can provide services to application programs, such as returning a
set of all methods, instances, or parents for review (or even modification)

You might also like