Chapter 1

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 44

Chapter-one

Object Oriented Software


Engineering
Outline
Introduction
Two Orthogonal views of software
The object-oriented paradigm
Object-Oriented concept and principles
Characteristics of OO Approach
Identify elements of an object model

Overview of SE Instructor: Zelalem F. Aca. year 2013


Introduction
3

What is Object Oriented


Software Engineering ?

Overview of SE Instructor: Zelalem F. Aca. year 2013


Object Oriented Software Engineering
4

Object-Oriented Software Engineering is the process of

solving customers’ problems by using the Object-


Oriented concepts and
It is the systematic development and evolution of large,

high-quality software systems within cost and time.

Overview of SE Instructor: Zelalem F. Aca. year 2013


Object Oriented Software Engineering
5

 OOSE is a software design technique that is used in

software design in object-oriented programming.


 It is the first object-oriented design methodology that

employs use cases in software design.


 It includes a requirements, an analysis, a design, an

implementation and a testing model.


 OOSE is one of the predecessors of the Unified Modeling

Language (UML).
Overview of SE Instructor: Zelalem F. Aca. year 2013
Two Orthogonal views of software
6

The Structural
"part of" hierarchy, functions
concentrate on actual components
concrete

The Object Oriented


 "is a" hierarchy
 concentrate on kinds of components
 abstract

Overview of SE Instructor: Zelalem F. Aca. year 2013


Count…
7

Two Orthogonal views of software

Overview of SE Instructor: Zelalem F. Aca. year 2013


SW development methodology?
8

 It is a process or series of processes used in software


development.
 A comprehensive system development methodology
utilizes sets of tools as well as the style in which they
are to be used.
 It is a practices, procedures, and rules used to develop
software.
Overview of SE Instructor: Zelalem F. Aca. year 2013
Count…
9

In an OO environment, Software is a collection of discrete

objects.
These objects encapsulate their data and functionalities to

model real world "objects.


An object-oriented life cycle encourages a view of the world

as a system of cooperative and collaborating agents.

Overview of SE Instructor: Zelalem F. Aca. year 2013


Cont…
10

 It Provides advantage at management and technical levels.

 the focus is on capturing the structure and behavior of

information systems into small modules that combines both


data and process.
 The main aim of Object Oriented Design (OOD) is to

improve the quality and productivity of system analysis and


design by making it more usable.

Overview of SE Instructor: Zelalem F. Aca. year 2013


Why Object Oriented approach …?
11

 Object technologies lead to reuse. Reuse leads to:

 Faster development
 Higher quality programs
 Easier to maintain(because its structure is inherently
decoupled)
 Easier to adapt

 Easier to scale(Large system can be created by assembling

reusable subsystem )
Overview of SE Instructor: Zelalem F. Aca. year 2013
Benefits of Object Orientation
12

 An Object orientation produces systems that are

easier to develop, more flexible, more robust than


other traditional approaches
• Faster development,
• Re-Usability,
• Increased quality,
• and easier maintenance.
Overview of SE Instructor: Zelalem F. Aca. year 2013
Elements of OO Approaches
13

Characteristics of OO System
 Objects: An object is something that is exists within

problem domain and can be identified by data (attribute)


or behavior.
 All tangible entities (student) and some intangible entities

(bank account) are modeled as object.


 Attributes: describe information about the object.

Overview of SE Instructor: Zelalem F. Aca. year 2013


Elements of OO Approaches
14

 Behavior − It specifies what the object can do. It defines


the operation performed on objects.
 Class − A class encapsulates the data and its behavior.

Methods − Methods determine the behavior of a class.


They are nothing more than an action that an object can
perform.
 Message − A message is a function or procedure call from
one object to another. They are information sent to objects
to trigger methods.
Overview of SE Instructor: Zelalem F. Aca. year 2013
What is Unified Approach ?
15

The unified approach (UA) is a methodology for


software development.
 It utilizes the Unified Modeling Language (UML)
which is a set of notations and conventions used to
describe and model an application.

Overview of SE Instructor: Zelalem F. Aca. year 2013


What is Unified Approach ?
16

Unified modeling language (UML) is a standard

set of techniques for describing object-oriented


designs
 Class models
 Use case models
 Interaction diagrams
 State and activity diagrams
Overview of SE Instructor: Zelalem F. Aca. year 2013
The Object-Oriented Paradigm
17
 For many years
OO was used to denote software development approach

that used OO programming languages (Java, C++, …)


 Today
 OO encompasses a complete view of SE
 Software engineers and their managers must consider such
items as:-
 Object-oriented requirements analysis (OORA)

 Object-oriented design (OOD)

 Object-oriented domain analysis (OODA)

 Object-oriented database systems (OODBMS) and

Overview of SE Instructor: Zelalem F. Aca. year 2013


Cont…
18

 Object -Oriented process model

Overview of SE Instructor: Zelalem F. Aca. year 2013


What is object…?
19

 Object is an abstraction that enables us to model the

world in ways that help us better understand and

navigate it .
 Abstraction is a mental ability that permits people to

view real-world problem domains with varying

degrees of detail depending on the current context

of the problem
Overview of SE Instructor: Zelalem F. Aca. year 2013
What is object…?
20

Overview of SE Instructor: Zelalem F. Aca. year 2013


What is object…?
21

Overview of SE Instructor: Zelalem F. Aca. year 2013


What is object…?
22

Overview of SE Instructor: Zelalem F. Aca. year 2013


Cont…
23

Overview of SE Instructor: Zelalem F. Aca. year 2013


Cont…
24
 Objects are any thing that exist in nature, in human-made, in
business, and in Products that we use.
 They Can be categorized, described , organized, combined,
manipulated and created.
 Consider, an example of a real world object : A is a member
(instance) of furniture , but B is a class which has many
objects.
A. chair B. furniture

Overview of SE Instructor: Zelalem F. Aca. year 2013


Cont…
25
 Every objects can be manipulated in a variety of ways
Bought, sold, physically modified (saw, paint)

 Operation/Service/Method: Modify one or more
attributes.

Overview of SE Instructor: Zelalem F. Aca. year 2013


Cont…
26
Generic attributes can be associated with every object in the
class(example: furniture).
 Example:
 Among the many possible attributes of
furniture are:
Cost, dimensions, weight, location, and color
Apply table, chair, sofa
Chair inherits all attributes of furniture
So, object chair can be reused the
attribute of furniture.

Overview of SE Instructor: Zelalem F. Aca. year 2013


Class and Object
27

A class is an OO concept that encapsulates the data and


procedural abstractions required to describe the content
and behaviour of some real world entity.
Class is a generalized description that describes a
collection of similar objects.
Object is an instance of a class that encapsulates both
 Data (attributes) and

 Function (operation, method and service) that


manipulate the data.

Overview of SE Instructor: Zelalem F. Aca. year 2013


Cont…
28
 Classes and Objects :
 Data abstraction(attributes) enclosed by procedural abstraction

(operation, methods)
 A class has
 Generalized description
 Collection of Similar objects
 Super class and subclass

Overview of SE Instructor: Zelalem F. Aca. year 2013


Cont…
29

 Message: is the means by which objects interact.


 Stimulates some behaviour to occur in the receiving object
 The behaviour is accomplished when an operation is executed

Overview of SE Instructor: Zelalem F. Aca. year 2013


Cont…
30

 Message: [destination, operation, parameters]


Where
 Destination defines the receiver object that is
stimulated by the message,
 Operation refers to the operation that is to receive
the message, and
 Parameters provides information that is required for
the operation to be successful.

Overview of SE Instructor: Zelalem F. Aca. year 2013


Object Models
31
 Object models represent objects and relationships between
objects.
 Each box represents :-
- A type of object and name
- Attributes, and
- Methods of the object.
 An arc between two objects represents a relationship between the
objects.
 Arcs may be labelled in the centre with a name of the association.
 At each end a multiplicity may be given indicating how many
different associations of the same kind are allowed.

Overview of SE Instructor: Zelalem F. Aca. year 2013


How to identify a potential object?
32
 A potential object should satisfy most or all of the ff.
characteristics:
 Retained information: if information about it must
be remembered so that the system can function.
 Needed services: The potential object must have a
set of identifiable operations that can change the
value of its attributes in some way.
 Multiple attributes: an object with a single
attributes may be useful during design but not useful
at analysis.

Overview of SE Instructor: Zelalem F. Aca. year 2013


Cont…
33

Common attributes: A set of attributes can be defined


for the potential object and these attributes apply to all
occurrences of the object.
Common operations: A set of operations can be defined
for the potential object and these operations apply to all
occurrences of the object.
Essential requirements: External entities that appear in
the problem space and produce or consume information
essential to the operation of any solution for the system.

Overview of SE Instructor: Zelalem F. Aca. year 2013


Characteristics of OOS
34

 Three characteristics of OO systems make them


unique
 Encapsulation
 Inheritance
 Polymorphism

 Class encapsulate data and the operations that work on

the data in a single package.

Overview of SE Instructor: Zelalem F. Aca. year 2013


Encapsulation
35

 Encapsulation is an Object Oriented Programming concept that binds

together the data and functions that manipulate the data, and that
keeps both safe from outside interference and misuse.
 This provides a number of important benefits that the internal

implementation details of data and procedures are hidden from the


outside world (information hiding)
Encapsulation tells us that we should know just an interface of class to

be able to use it. We don't have to know anything about internals of class
to be able to use it.
Overview of SE Instructor: Zelalem F. Aca. year 2013
Cont…
36

 The object chair encapsulates data


 The attributes values that define chair
 The operations (the actions that are applied to
change the attribute chair)
 object encapsulates [data, operation, other objects,
constants and other related information]

Overview of SE Instructor: Zelalem F. Aca. year 2013


Inheritance
37

 It is a mechanism in which one class(sub class) acquires

the property of another class (super class).


 Inheritance is one in which a new class is created that

inherits the properties of the already exist class.


 It supports the concept of code reusability and reduces
the length of the code in object-oriented programming.

Overview of SE Instructor: Zelalem F. Aca. year 2013


Types of inheritance
38

 Single inheritance
where subclasses inherit the features of one superclass. A
class acquires the properties of another class.
 Multiple inheritance
where one class can have more than one superclass and
inherit features from all parent classes.
 Multilevel inheritance
where a subclass is inherited from another subclass.

Overview of SE Instructor: Zelalem F. Aca. year 2013


Cont…
39
 A subclass Y inherits all of the attributes and operations
associated with its super-class, X
 All data structures and algorithms originally designed
and implemented for X are immediately available for Y
 No further work need be done
 Reuse has been accomplished directly

Overview of SE Instructor: Zelalem F. Aca. year 2013


Example
40

Overview of SE Instructor: Zelalem F. Aca. year 2013


Polymorphism
41

 Polymorphism is that in which we can perform a task in multiple

forms or ways.
 It is applied to the functions or methods.

 Polymorphism allows the object to decide which form of the

function to implement at compile-time as well as run-time.

Types of Polymorphism are:


 Compile-time polymorphism (Method overloading)
 Run-time polymorphism (Method Overriding)

Overview of SE Instructor: Zelalem F. Aca. year 2013


Polymorphism
42

A characteristics that greatly reduces the effort


required to extend an existing OO system
The ability for two or more objects to respond to
the same request, each in its own way.

Overview of SE Instructor: Zelalem F. Aca. year 2013


Cont…
43
 A property of object oriented software by which an
abstract operation may be performed in different ways
in different classes.
 Requires that there be multiple methods of the same

name
 The choice of which one to execute depends on the

object that is in a variable


 Reduces the need for programmers to code many if-

else or switch statements.

Overview of SE Instructor: Zelalem F. Aca. year 2013


44

END!
Overview of SE Instructor: Zelalem F. Aca. year 2013

You might also like