0% found this document useful (0 votes)
18 views69 pages

OOSE Unit-1 & 2

The document discusses the importance of object-oriented concepts in software engineering, emphasizing the need for systematic and disciplined approaches to software development. It outlines key principles such as encapsulation, inheritance, polymorphism, and the methodologies of various experts in the field. Additionally, it highlights the significance of modeling and the Unified Modeling Language (UML) in creating high-quality, maintainable software systems.

Uploaded by

Abisha
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)
18 views69 pages

OOSE Unit-1 & 2

The document discusses the importance of object-oriented concepts in software engineering, emphasizing the need for systematic and disciplined approaches to software development. It outlines key principles such as encapsulation, inheritance, polymorphism, and the methodologies of various experts in the field. Additionally, it highlights the significance of modeling and the Unified Modeling Language (UML) in creating high-quality, maintainable software systems.

Uploaded by

Abisha
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/ 69

Object Oriented Concepts

Status of Software Engineering

A son mentioned to his father that for his birthday, he


would like something that accelerates from 0 to 100 in
four seconds.
Son was expecting something like this........
Status of Software Engineering

But father presented him with something very different...


Status of Software Engineering

The requirements The developers


understood it in This is how the This is how the
specification was problem was
that way problem is solved now
defined like this solved before.

This is how the program is


That is the program after described by marketing This, in fact, is what the
debugging department customer wanted …
Object oriented concepts
 The size and complexity of software is increasing day by day.
Conventional approaches of software design and implementation may not
be effectively applicable.
 We want to simplify the development process and to produce high quality
maintainable software.
 As we all know, development may take few years and same may have to
be maintained for many years.
 A maintainable software may reduce the maintenance cost and high
quality may enhance the sustainability of the software.
Object oriented concepts
 It is becoming popular to design, develop and maintain large size, complex
and critical software systems using object oriented paradigm.
 Due to its popularity and acceptability in customers, companies are also
releasing the object oriented versions of their existing software products.
 Many of the customers expect object oriented software solutions and
request the same for their forthcoming projects.
What is Software Engineering?
o There are two words ‘software’ and
‘engineering’.
o Engineering forces us to focus on
systematic, scientific and well defined
processes to produce a good quality
product.
o The application of a systematic,
disciplined, quantifiable approach to the
development, operation and maintenance
of software, and the study of these
approaches, that is, the application of
engineering to software.
What is Software Engineering?
o It is a profession dedicated to
designing, implementing, and
modifying software so that it is of
higher quality, more affordable,
maintainable, and faster to build.
What is Software Engineering?
Program vs. Software
o Program is set of instructions written for
a specific purpose.
o Software is the combination of
program(s), documentation (documents
produced during development) and
operating procedure manuals (delivered
with programs to customer at the time of
release).
What is Software Engineering?
o Program vs. Software

Software

Program(s) Documentation Operating


procedure manuals
What is Software Engineering?
Program vs. Software
o Software Requirements and
Specification document
o Software Design Document
o Test plan document
o Test suite document
o Source code
What is Software Engineering?
Program vs. Software
o Installation manual
o System administration manual
o Beginner’s guide tutorial
o System overview
o Reference guide
Software Characteristics
Software does not wear out.

Burn-in
phase Wear out
phase
Failure Intensity

Useful life
phase

Time
Software Characteristics

 Flexibility of Software

 Reusability of Software
What is Object Orientation?
o Why is object oriented software
development taking centre stage in
software industry?
o Why object oriented version of
existing software products are
coming in the market?
What is Object Orientation?
o We feel that real strength of object
oriented approach is its modeling ability
to represent real world situations.
o A model helps us to visualize and
understand a real situation along with its
behavior.
o Architects use models to demonstrate
their conceptual constructs which may
also increase the confidence of their
clients in terms of design, aesthetics and
feel of the proposed project.
What is Object Orientation?
Classes & Objects
o All book types may be combined to form a group called class.
o All objects are instances of a class.
o The class describes the structure of the instance which include
behaviour and information.
Class
Book

Software Software Software


Engineering Testing Quality
Object1
Object2 Object3
Classes & Objects
o Suppose there are 10 books in a
library of same subject, language,
publisher and author; but these
books are distinguishable due to
their own title and accession
number.
o All objects have unique
identification like accession
number in case of a book in the
library. In a library, book, student,
faculty, employee are the example
of objects.
Classes & Objects
o A set of objects with similar behaviour & information may constitute
a class.
o Hence, an object has a state (information) and it offers number of
operations (behaviour) depending upon its class.
Classes & Objects
o A class represents a template for several objects and describes how
these objects are structured internally. Objects of the same class
have the same definition both for their operations and for their
information structures.
o An instance is an object created from a class. The class describes
the (behaviour & information) structure of the instance, which the
current state of the instance is defined by the operations performed
on the instance.
o An attribute (or information / state) is a data value held by the object
of a class.
o Operations (or behaviour) are the functions which may be applied on
a class.
Classes & Objects

Book Class name


accessiono : Integer
subjectdescriptor : String
ISBN : Long
booktitle : String
language : String Attributes
authorfname : String
authorlname : String
publisher : String
Book Class
addbook()
deletebook()
updatebook()
Operations
viewbook()
Classes & Objects
Messages
o Objects communicate through passing
messages.
o A message is a request for performing an
operation by some object in the system.
o A message may consist of the identification of
the target object, name of the requested
operation and other relevant information for
processing the request.
o An object which originates a message is called
the sender and the object which receives a
message is called the receiver.
Message Exchange in Classes
Encapsulation
 Encapsulation is also known as
information hiding concept.
 The data and operations are
combined into a single unit.
 The only way to access data is
through operations which are
designed to operate on the data.
 The data is not available to
external world.
 This concept may make the data
safe and secure from external
interventions.
Encapsulation
Inheritance
o We may organize our knowledge
in terms of hierarchy of
categories.
o All classes inherit information
from the upper classes.
o Each derived class inherits the
attributes of its base class and
this process is known as
inheritance. In general, low level
classes (known as subclasses
or derived classes) inherit state
and behaviour from their high
level class (known as a super
class or base class).
Member
memberID : Long
photograph : Variant
name : string
fname : String
DOB : Date
phone : Long
email : String
memberdate : Date
validupto : Date

addmember()
deletemember()
updatemember()
viewmember()

student faculty employee


rollno facultyID employeeID
school school branch
programme
Inheritance
class Member
{
private:
long int memberID;
char photograph [300];
char name[50];
char fname [50];
Date DOB;
long int phone;
char email [60];
Date memberdate;
Date validupto;

public:
addmember();
deletemember();
updatemember();
viewmember();
};
Inheritance
class employee : public Member //publicly derived
class
{
long int employeeID;
char branch[60];
};

class faculty : public Member //public inheritance


{
long int facultyID;
char school[100];
};

class student : public Member //public inheritance


{
long int rollno;
char school[100];
char programme[100];
};
Method
o A ‘method’ is the sequence of steps (or set of operations) to be
performed to fulfill the assigned task.
o For example, four methods ‘addMember’, ‘deleteMember’,
‘updateMember’, and ‘viewMember’ are implemented in Member class.
o There may be many methods available for any task. It is the
responsibility of receiver of the message to choose an appropriate
method to complete task effectively & efficiently.
Polymorphism
Polymorphism
 The dictionary meaning of polymorphism is
“many forms”.
 In the real world, the same operations may
have different meanings in different
situations.
 Same message is sent to different objects
irrespective of their class, but the
responses of objects may be different.
Polymorphism
 Polymorphism is considered to be an
important concept of any object oriented
programming languages.
 As we all know, arithmetic operators such as +, =,
- are used to operate on primary data types such
as int, float etc.
 We may overload these operators so that they
may operate in the same way on objects (user
defined data types) as they operate on primary
data types.
 Thus, the same operators will have multiple
Data Abstraction
 Data abstraction is to collect essential
elements composing to a compound data.
Object Composition
 The use of objects as data members in another class is
referred to as object composition.
 The object is a collection of set of objects represented
through has-a relationship.
 In object oriented systems, has-a relationship depicts that an
object is declared as an attribute in another class.
Object Composition

Class A
{
………
A B };

……… Oa: A Class B


{
A Oa;
};
Object Oriented
Methodologies
 Object oriented analysis by Coad and
Yourdon
 Object oriented design by Booch
 Object modeling technique by Rumbaugh et
al.
 Object oriented software engineering by
Jacobson
Object Oriented
Methodologies
Coad and Yourdon Methodology
 Identification of classes and
objects
 Identification of structures
 Definition of subjects
 Definition of attributes
 Definition of services (methods)
Object Oriented Methodologies
Coad and Yourdon Methodology
 Identification of classes and objects involves
investigating the application domain and the system’s
environment.
 The behavior of each objects are found and this information is
documented. Identification of structures involve identification of is-
a and whole-part relationships.
 The is-a relationship captures class inheritance (known
as Gen-Spec structure) and whole-part relationship
captures the information that how an object is part of
another object.
Object Oriented
Methodologies
Coad and Yourdon Methodology
 Each structure is classified into a subject.
 Attributes are the data members of the class.
 The attributes for each object are defined and kept at the
appropriate level in the inheritance hierarchy.
 Defining services involve identification of operations
in a class. This also involves identification of
interfaces amongst the objects through messages.
Object Oriented
Methodologies
Booch Methodology
 Grady Booch proposed object oriented methodology in
his book Object-Oriented Design (OOD) in 1991.
 The primary aim of OOD was to establish a base for
implementation of object oriented systems.
 The Booch methodology can be broadly divided into two
processes: macro process and micro process.
Object Oriented
Methodologies
Booch Methodology
Establishment Construction
of requirements of analysis
model

Design of
architecture

Maintenance of Evolution in
delivered the form of
functionality refinements
Object Oriented
Methodologies
Booch Methodology
 In first phase the requirements are established using
context diagrams and prototypes.
 The outcomes of this phase are core requirements of
the system.
 Analysis process involves requirement capturing and
understanding. It involves “what of the system”. This
phase consists of construction of use cases,
identification and prioritization of risks.
Object Oriented
Methodologies
Booch Methodology
 Design phase focuses on construction of architecture of
the system and involves:
 Identification of horizontal layers
 Mapping classes to subsystems
 Release planning
 Attaching risks identified in analysis phase to releases
 Evolutionary phase involves implementation of the
system and each release adds to the functionality of the
system.
 Maintenance phase consists of post deployment
activities.
Object Oriented
Methodologies
Booch Methodology
 It is the lower level process. The following recursive
steps are followed in OOD micro process
 Identification of classes and objects
 Identification of semantics of classes and objects
 Identification of relationship amongst classes and objects
 Specification of interfaces and implementation of classes and
objects
Object Oriented
Methodologies
Rumbaugh Methodology
 Rumbaugh developed a technique
that focuses on analysis, design
and implementation of the system.
This technique is popularly known
as Object Technique (OMT).
 The OMT consists of four phases:
analysis, system design, object
design and implementation.
Object Oriented
Methodologies
Rumbaugh Methodology
 Analysis phase: Analysis phase is composed of three
submodels given below:
 Object model: It captures the static aspect of the system.
 Dynamic model: It captures the behavioral aspects of the
object models and describes state of the objects.
 Functional model: It represents the functional aspects of the
system in terms of operations defined in the classes.
Object Oriented Methodologies
Rum Baugh Methodology
 System design phase: In this phase high level design is
developed taking the implementation environment including
DBMS and communication protocols into account.
 Object design phase: The goal of this phase is to define the
objects in details. The algorithms and operations of the
objects are defined in this phase. New objects may be
identified to represent the intermediate functionality.
 Implementation phase: Finally the objects are implemented
following coding standards and guidelines.
Object Oriented
Methodologies
Jacobson Methodology
 All the methodologies described above still lack of a
comprehensive architecture to develop a software
project.
 The Jacobson’s methodology known as “Object
Oriented Software Engineering (OOSE)” consists of
five models:
 The requirement model: The aim of the model is to gather
software requirements.
 The analysis model: The goal of this model is to produce
ideal, robust and modifiable structure of an object.
Object Oriented
Methodologies
Jacobson Methodology
 The design model: It refines the objects keeping the
implementation environment in mind.
 The implementation model: It implements the objects.
 The test model: The goal of the test model is to validate
and verify the functionality of the system.
Object Oriented Modeling
 Object oriented modeling is a way of constructing visual
models based on real world objects.
 Modeling helps in understanding the problems,
developing proper documents and producing well
designed programs.
 Modeling produces well understood requirements,
robust designs, high quality and maintainable systems.
Object Oriented Modeling
 UML represents the combination of the notations used
by Booch, Rumbaugh and Jacobson.
 The best concepts and processes were extracted from
all the methodologies till date and combined into UML.
 UML was adopted by Object Management Group
(OMG) in November, 1997.
 UML is defined as language for visual modeling that
allows to specify, visualize, construct, understand and
document the various artifacts of the system.
Some Terminologies
 Customers, Developers and Users
Customers are persons who request the system,
approve the system and pay for the system.
Developers are the persons at the supplier side
who are responsible for the development of the
system. Users are the persons who will actually
use the system.
For example in the library management system
developed for a university, the customer is the
university, developer is the one at the supplier side
who develops the system and the users are the
persons in the library staff who will actually work
on the system.
Some Terminologies
 Product and process
Product is what is delivered to the customer. It may include Software
Requirement Specification (SRS) document, source code, test reports, user
manuals and system guide.
Process is the way in which the software is produced. A process is like a
tunnel through which the project goes in order to produce a product

product

process
Some Terminologies
 Actor, Use Case, Use Case Model and Use Case Scenario
An actor represents the role of a user that interacts
with the system. Some of the examples of the actors
used in “Library Management System” are
administrator, data entry operator, student, library
staff and faculty.
A use case describes who (any user) does what
(interaction) with the system, for what goal, without
considering the internal details of the system. The
use case model depicts actors, use cases and the
relationship between them.
A use case scenario is an instance of a use case or
a complete path through the use case.
Some Terminologies
 System and Subsystems
System is an organized and arranged structure as a whole that consists of
interrelated and well defined procedures, processes and methods. All systems
consist of inputs, outputs, feedback mechanisms and boundaries.

A system may consist of several subsystems. Subsystems are a way of


reducing complexity of system.

For example, in a company, accounts, sales, marketing are different


subsystems. In object oriented analysis, objects may be grouped together to
form a subsystem.
Some Terminologies
 Class, Responsibility and Collaboration
Class is template that consists of attributes and operations. Responsibilities
are attributes and operations included in a class.

Collaborations are the other classes that a class calls in order to achieve the
functionality.

The class, responsibility and collaboration are often combined together in


object oriented analysis to depict the functionality of a class and relationship
between classes.
Some Terminologies
 Measures, Metrics and Measurement

A measure provides a quantitative indication of the extent, dimension,


size, capacity, efficiency, productivity or reliability of some attributes of a
product or process.

Measurement is the act of evaluating a measure.

A metric is a quantitative measure of the degree to which a system,


component or process possesses a given attribute.
Some Terminologies
 Quality and Reliability
Software reliability is one of the important factor of software quality.
Software reliability is defined as:

“the probability of failure free operation for the specified time in a specified
environment”

Software Quality measures how well software is designed (quality of design),


and how well the software conforms to that design (quality of conformance).

Software Reliability is one of the part of software quality.

To produce good quality product, a software tester must verify and validate
throughout the software development process.
Some Terminologies
 Quality Assurance and Quality Control
The purpose of quality assurance activities is to enforce standards and
techniques to improve the development process and prevent bugs from ever
occurring.
Quality assurance group monitors and guides throughput the software
development life cycle. Examples are reviews, audits, etc.

Quality control attempts to build a software and test it thoroughly. It concentrates


on specific products rather than processes as in the case of quality assurance.
This is a defect detection and correction activity which is usually done after the
completion of the software development,. Example is software testing at various
levels.
Some Terminologies
 Verification and Validation
Verification: (as defined by IEEE/ANSI)
It is a process of evaluating a system or component to determine whether the
products of a given development phase satisfy the conditions imposed at the start
of that phase.
 Verification is the process of evaluating, reviewing, inspecting and doing desk
checks of work products such as requirement specifications, design specification
and code.
 It can be applied to all those things that can be reviewed in the early phases to
make sure that what comes out of that phase is what we expected to get.
 It is a ‘human testing’ as it involves looking at the documents on paper.
Some Terminologies
Validation: (as defined by IEEE/ANSI)

It is a process of evaluating a system or component during or at


the end of development process to determine whether it satisfies
the specified requirements.

 It involves executing the actual software.


 It is a computer based testing process. It usually exposes
symptoms of errors.
 Definition: Testing = Verification + Validation
Some Terminologies
 Error, Mistake, Bug, Fault and Failure
People make errors. A good synonym
is mistake. This may be a syntax error
or misunderstanding of specifications.
Sometimes, there are logical errors.

When developers make mistakes


while coding, we call these mistakes
“bugs”.
Some Terminologies
A fault is the representation of an error, where representation is the
mode of expression, such as narrative text, data flow diagrams, ER
diagrams, source code etc. Defect is a good synonym for fault.

A failure occurs when a fault executes. A particular fault may cause


different failures, depending on how it has been exercised.
Some Terminologies
 States and Events
A state is an abstract situation in the life cycle of
an entity that occurs in response to occurrence of
some event.

An event is an input (a message or method call).


Due to occurrence of some event, the system
transits from one state to other.
Some Terminologies
S. No Traditional approach Object oriented approach
1 The system is viewed as collection of The system is viewed as collection of
processes. objects.
2 Data flow diagrams, ER diagrams, UML models including use case diagram,
data dictionary and structured charts class diagram, sequence diagrams,
are used to describe the system. component diagrams etc are used to
describe the system.
3 Reusable source code may not be The aim is to produce reusable source
produced. code.
4 Data flow diagrams depicts the Classes are used to describe attributes and
processes and attributes functions that operate on these attributes.
5 It follows top-down approach for It follows bottom-up approach for
modeling the system. modeling the system.
6 Non iterative Highly iterative
Summary
 Object oriented software engineering
is an upcoming area of research,
practice and industrial applications.
 All companies are making these
processes compliant to object oriented
paradigm.
 Developers are focusing these
learning processes on object oriented
concepts and programming language
like C++, Java etc.
 Customers are also changing their
mind sets towards object oriented
software products.

You might also like