Oose 1

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 38

Object Oriented Software Engineering

Activity # 1

Overview of O-O systems Development


• Introduction
• Two orthogonal view of the software
• OO systems development methodology
• Why an Object Orientation
• Overview of the Unified Approach
Learning outcomes
• At the end of this activity, You should be able to define
and understand
– The object-oriented philosophy and why we need to study it
– The unified approach

BiT, O-O Software Engineering


Introduction
• Software development is dynamic and always undergoing
major changes.
– The methods we will use in the future will differ significantly from
those currently in practice.
– We can anticipate which methods and tools are going to succeed,
but we can not predict the future.
• Today a vast number of tools and methodologies are available
for systems development.
• Systems development refers to all activities that go into
producing an information systems solution.
– Systems development activities consist of systems analysis,
modeling, design, implementation, testing and maintenance.

BiT, O-O Software Engineering


Cont’d
• Software development methodology is a series of processes
that, if followed, can lead to the development of an application.

• The software process describe how the work is to be carried


out to achieve the original goal based on the system
requirement.
– Each process consists of number of steps and rules that should be
performed during development.

• Thus, Object oriented software engineering (OOSE) is an object


modeling language and methodology developed by Ivar
Jacobson in 1992.

BiT, O-O Software Engineering


Cont’d
• Object-oriented Software Engineering is the use of object
technologies in building software.
• Object technologies is often used to encompass all aspects of
an object-oriented view and includes analysis, design, and
testing methods; programming languages; tools; databases;
and applications that are created using object-oriented
approach.

BiT, O-O Software Engineering


Two orthogonal views of the software
• Two paradigms of software development,
I. Traditional system development methodology
II. Object oriented system development methodology
• The fundamental difference between the object oriented
systems and their traditional counterparts is the way in which
you approach problems.
• Most traditional development methodologies are either
algorithm centric or data centric.
– In an algorithmic centric methodology, you think of an
algorithm that can accomplish the task, then build data
structures for that algorithm to use.
– In a data centric methodology, you think how to structure the
data, then build the algorithm around that structure.
BiT, O-O Software Engineering
Traditional Approach
• Traditional software development technique view software as a
collection of programs(or functions) and isolated data.
• The traditional approach to software development tends toward
writing a lot of code to do all the things that have to be done

BiT, O-O Software Engineering


Object-Oriented system development
Methodology
• Object oriented systems development is a way to develop
software by building self contained modules or objects that can
be easily replaced, modified, and reused.
• It encourages a view of the world as a system of cooperative
and collaborating objects.
• In an object oriented environment, software is a collection of
discrete objects that encapsulate their data as well as the
functionality to model real world objects.
• Object oriented approaches attempt to build models that
mimic the real world.

BiT, O-O Software Engineering


Con’t
• Many systems we want to build involve things that exhibit
behavior as well as having structure, and also may exhibit time-
dependent aspects.
• An object orientation yield important benefits to the practice of
software construction.
• Each object has attributes (data) and methods (functions).
– Objects are grouped into classes.
• In object oriented terms, we discover and describe the classes
involved in the problem domain

BiT, O-O Software Engineering


BiT, O-O Software Engineering
BiT, O-O Software Engineering
Con’t
• In an OO system, everything is an object and each object is
responsible for itself.
• For example, every window application needs Windows
objects that can open themselves on screen and either display
something or accept input.
– A window object is responsible for things like opening, sizing,
and closing itself
– A chart object is responsible for things like maintaining data
labels even for drawing itself.

BiT, O-O Software Engineering


Con’d
• The object oriented environment emphasizes its cooperative
philosophy by allocating tasks among the objects of the
applications.
– In other words, rather than writing a lot of code to do all
the things that have to be done, you tend to create a lot of
helpers that take on an active role, a spirit, that form a
community whose interactions become the application.
• Instead of saying, system compute the payroll of this employee,
you tell the employee object, compute your payroll. This has a
powerful effect on the way we approach software development

BiT, O-O Software Engineering


Difference between traditional and OO Approach

Traditional approach Object oriented system Approach


Collection of procedures (functions) Combination of data and functionality
Focuses on function and procedures, Focuses on object. Classes, modules
different styles and methodologies that can be easily replaced modified
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 duration of project Decreases duration of project
Increase complexity Reduces complexity and redundancy

BiT, O-O Software Engineering


Assignment one
• Write short note on similarities and difference of the
following Object oriented Methodologies
a) Object oriented design by Booch
b) Object modeling technique by Rumbaugh
c) Object oriented software engineering by Jacobson

BiT, O-O Software Engineering


?
Why an object orientation

BiT, O-O Software Engineering


Why an object orientation
• Object oriented methods enable us to create sets of objects
that work together synergistically to produce software that
better model their problem domains than similar systems
produced by traditional techniques.
• OO systems are easier to adapt to changing requirements,
easier to maintain, more robust, and promote greater design
and code reuse.
• OO development allows us to create modules of functionality.

BiT, O-O Software Engineering


Cont’d

It leads to higher maintainability of software modules because its
structure is inherently decoupled.

It leads to object-oriented system that are easier to adapt and
easier to scale, i.e, large systems are created by assembling
reusable subsystems.

Faster development, Reusability, Increased Quality


The reasons why object orientation works
– High level of abstraction.
– Encouragement of good programming techniques.
– Promotion of reusability.
– Seamless transition among different phases of software development

BiT, O-O Software Engineering


Cont’d

• High level of abstraction


– The Top-down approach supports abstraction of the function level.
– The OO approach supports abstraction at the object level. The
object encapsulate both the data (attributes) and functions
(methods), they work as a higher level of abstraction. The
development can proceed at the object level, this makes designing,
coding, testing, and maintaining the system much simpler.

BiT, O-O Software Engineering


Cont’d
• 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. So
moving from one phase to another requires more complex
transition.
– The OO approach, use the same language to talk about analysis,
design, programming and database design. This seamless approach
reduces the level of complexity and redundancy and makes for
clearer, more robust system development.

BiT, O-O Software Engineering


Cont’d
• Encouragement of good programming techniques.
– A class in an object-oriented system carefully delineates between
its interface and the implementation of that interface. The
attributes and methods are encapsulated within a class (or) held
together tightly.

– Raising the level of abstraction from function level to object level


and focusing on the real-world aspects of the system, the object
oriented method tends to
• Promote clearer designs.
• Makes implementation easier.
• Provide overall better communication.

BiT, O-O Software Engineering


Cont’d
• Promotion of Reusability:
– Objects are reusable because they are modeled directly out of real
world. The classes are designed generically with reuse.
– The object orientation adds inheritance, which is a powerful
technique that allows classes to built from each other.
– The only different and enhancements between the classes need to
be designed and coded. All the previous functionality remains and
can be reused without change.

BiT, O-O Software Engineering


Overview of Unified Approach
• The unified Approach(UA) is a methodology for software
development.
• The UA, based on methodologies by Booch, Rumbaugh, and
Jacobson tries to combine the best practices, processes and
guidelines for OO software development along with the
object management groups unified modeling language
• UA utilizes the unified modeling language(UML) which is a set
of notations and conventions used to describe and model an
application
• Or The unified modeling language (UML)is a language for
specifying, constructing, visualizing and documenting the
software system and its components.

BiT, O-O Software Engineering


Cont’d
• The UA specifies the tasks or steps to develop an application,
the heart of UA is Jacobson’s use case.
• The UA consists of the following concepts:
– Use case driven approach
– Utilizing the UML for modeling
– Object oriented analysis
– Object oriented design
– Repositories of reusable classes and maximum reuse
– Prototyping and testing

BiT, O-O Software Engineering


Object Basics
• Informally , an object represents an entity, either physical,
conceptual, or software
• A more formal definition, an object is a concept, abstraction, or
thing with sharp boundaries and meaning for an object
• An object is an entity.
– It knows things(has attributes)
– It does things(provides services or has methods)
• For instance, Object’s attributes
– Attributes represented by data type
– They describe objects states
– In the Car example, the car’s attributes are:
• Color, manufacturer, cost, owner, model
BiT, O-O Software Engineering
Cont’d
• Object’s methods
– Method defines objects behavior and specify the way in which an
object’s data are manipulated.
– In the Car example, the car’s method’s are: Drive it, lock it, tow
it, carry passenger in it
• Object know things(attributes)
– I am an Employee.
• I know my name, social security number and my address
– I am a car.
• I know my color, manufacturer, cost, owner and model
• Object does things(methods)
– I know how to compute my payroll(Employee)
– I know how to stop(car)
BiT, O-O Software Engineering
Cont’d
• In an object oriented system, everything is an object. Object is
whatever an application wants to talk about
• Objects are grouped in classes
• Classes are used to distinguish one type of object from another
• A Class is a set of objects that share a common structure and a
common behaviour
• A single object is simply an instance of a class
• A class is a specification of structure (instance variables),
behavior(methods), and inheritance for objects

BiT, O-O Software Engineering


cont’d
• Classes are an important mechanism for classifying objects
• Main role of a class is to define the properties and procedures
(the state & behavior) and applicability of its instances

• In an OO system, a method or behavior of an object is defined


by its class
• Each object is an instance of a class
BiT, O-O Software Engineering
Cont’d
• Attributes: object state and properties
– Properties represent the state of an object.
– Eg attributes of car object

• Methods: object behavior and operation


– The set of things that an object do
– what do objects have to do with system development” rather
that “what is an object?”

BiT, O-O Software Engineering


Cont’d
• A car is an object a real-world entity, identifiably separate
from its surroundings. A car has a well-defined set of
attributes and methods in relation to other object.

BiT, O-O Software Engineering


Cont’d

BiT, O-O Software Engineering


Messages
• Objects communicate through passing messages.
• A message is a request for performing an operation by some
object in the system.
• A message may consist of the identification of the target
object, name of the requested operation and other relevant
information for processing the request.
• An object which originates a message is called the sender and
the object which receives a message is called the receiver .

BiT, O-O Software Engineering


Message Exchange in Classes

BiT, O-O Software Engineering


Inheritance
• We may organize our knowledge in terms of hierarchy of
categories.
• All classes inherit information from the upper classes.
• 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).

BiT, O-O Software Engineering


Cont’d

BiT, O-O Software Engineering


Cont’d
• A ‘method’ is the sequence of steps (or set of operations) to be
performed to fulfill the assigned task.
• For example, four methods ‘addMember’, ‘deleteMember’,
‘updateMember’, and ‘viewMember’ are implemented in
Member class.
• 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 .

BiT, O-O Software Engineering


Cont’d

BiT, O-O Software Engineering


Cont’d

BiT, O-O Software Engineering

You might also like