You are on page 1of 46

Object Oriented

Software
Engineering (SE
3081 )

CHAPTER ONE
Introduction

1.1 Introduction
Software engineering
The economies of ALL developed nations are dependent
on software.
More and more systems are software controlled
Software engineering is concerned with theories,
methods and tools for professional software
development.
development
Expenditure on software represents a significant fraction
of GNP in all developed countries.

Why Software Engineering ?


1950s and 1960s, Systems Development was
unstructured & unorganized
Interface misuse
On April 10, 1990, in London, an underground train left the station
without its driver.

Leap-year bug
A supermarket was fined $1000 for having meat around 1 day too long,
on February 29, 1988.

Unnecessary complexity
The C-17 cargo plane by McDonnell Douglas ran $500 million over budget
because of problems with its avionics software. The C-17 included 19 onboard
computers, 80 microprocessors, and 6 different programming languages.


Late and over budget
In 1995, bugs in the automated luggage system of the new Denver
International Airport caused suitcases to be chewed up. The airport opened
16 months late, $3.2 billion over-budget, with a mostly manual luggage
system.

On-time delivery
After 18 months of development, a $200 million system was delivered to a
health insurance company in Wisconsin in 1984. However, the system did
not work correctly: $60 million in overpayments were issued. The system
took 3 years to fix.

Software costs
Software costs often dominate computer system costs.
The costs of software on a PC are often greater than the
hardware cost.
Software costs more to maintain than it does to
develop. For systems with a long life, maintenance costs
may be several times development costs.
Software engineering is concerned with cost-effective
quality software development.

FAQs
What is software?
What is software engineering?
What is the difference between software engineering and computer
science?
What is the difference between software engineering and system
engineering?
What is a software process?
What is a software process model?
What are the costs of software engineering?
What are software engineering methods?
What is CASE (Computer-Aided Software Engineering)
What are the attributes of good software?
What are the key challenges facing software engineering?

What is Software?
Computer programs and associated documentation such as
requirements, design models and user manuals.
Software products may be developed for a particular customer or
may be developed for a general market.
Software products may be
Generic - developed to be sold to a range of different customers e.g. PC
software such as Excel or Word, AUTOCAD, .
Bespoke (custom)
(custom - developed for a single customer according to their
specification such as control system for electronic devices, Human resource
management system, Registrar System

New software can be created by developing new programs,


configuring generic software systems or reusing existing software .


An important difference between these types of software is
that, in generic products, the organization that develops the
software controls the software specification.
For custom products, the specification is usually developed
and controlled by the organization that is buying the software.
software
The software developers must work to that specification.
However, the line between these types of products is
becoming increasingly blurred.
blurred More and more software
companies are starting with a generic system and customizing
it to the needs of a particular customer. Enterprise Resource
Planning (ERP) systems, such as the SAP system, are the best
examples of this approach. Here, a large and complex system
is adapted for a company by incorporating information about
business rules and processes, reports required,
required and so on

Group Assignment one


Read About Enterprise Resource Planning (ERP) and
Write a short description about ERP, its components and
so on. Choose one component and try to modify some of
its functionality.
Due Date 1 week after the assignment has been given

What is software engineering?


Software engineering is an engineering discipline that is
concerned with all aspects of software production from
the early stage of system specification to maintaining
the system.
system
Software engineers should adopt a systematic and
organised approach to their work and use appropriate
tools and techniques depending on the problem to be
solved, the development constraints and the resources
available.

What is the difference between


software engineering and
computer
Computer sciencescience?
is concerned with theory and

fundamentals that underlie computers and software


systems; software engineering is concerned with the
practicalities of developing and delivering useful software.
Some knowledge of computer science is essential for
software engineers in the same way that some knowledge
of physics is essential for electrical engineers.
Computer science theories are still insufficient to act as a
complete underpinning for software engineering

What is the difference between


software engineering and
system
engineering?
System engineering
is concerned with all aspects of

computer-based systems development including


hardware, software and process engineering.
engineering Software
engineering is part of this process concerned with
developing the software infrastructure, control,
applications and databases in the system.
System engineers are involved in system specification,
architectural design, integration and deployment
(Consider aircraft and chemical plants).

What is Software Process


A set of activities whose goal is the development or
evolution of software.
Generic activities in all software processes are:
1.Specification - what the system should do and its
development constraints
2.Development - production of the software system
3.Validation - checking that the software is what the customer
wants
4.Evolution - changing the software in response to changing
demands(needs).

What is a software process


model?
A simplified representation of a software process, presented from a specific
perspective.
It might include activities that are part of the software process, software
products, and the role of people involved in software engineering.
Examples of process perspectives are

Workflow perspective - this shows sequence of activities in the process along with
their inputs, outputs and dependencies; the activities in this model represent the
human actions.
Data-flow perspective this represents the process as a set of activities, each of
which carries out some data transformation. It shows how the input to process, such
as a specification, is transformed to an output, such as a design;
Role/action perspective represents the roles of the people involved in the software
process and the activities for which they are responsible.

Generic process models

Waterfall;
Iterative development;
Component-based software engineering.

What are the costs of software


engineering?
Roughly 60% of costs are development costs, 40% are
testing costs.
costs For custom software,
software evolution costs often
exceed development costs.
Costs vary depending on the type of system being
developed and the requirements of system attributes
such as performance and system reliability.
reliability
Distribution of costs depends on the development
model that is used.

What are software engineering


methods?
It is a structured approaches to software development which
include system models, notations, rules, design advice and
process guidance for a quality software production in a cost
effective manner
1.Model descriptions
Descriptions of graphical models which should be produced;
2.Rules
Constraints applied to system models;
3.Recommendations
Advice on good design practice;
4.Process guidance
What activities to follow.

What is CASE (Computer-Aided


Software Engineering)?
Software systems that are intended to provide automated
support for software process activities.
CASE systems are often used for method support.
Upper-CASE
Tools to support the early process activities of requirements and design;

Lower-CASE
Tools to support later activities such as programming, debugging and
testing.

What are the attributes (non


functional requirement) of good
software?
The software should deliver the required functionality and performance
to the user and should be maintainable,
maintainable dependable and acceptable.
acceptable
Maintainability

Software must evolve to meet changing needs;

Dependability

Software must be trustworthy; includes reliability, security, and safety;

Efficiency

Software should not make wasteful use of system resources; includes


responsiveness, processing time, memory utilization,...

Acceptability/Usability

Software must be accepted by the users for which it was designed. This means it
must be understandable, usable and compatible with other systems and have
proper documentation.

What are the key challenges


facing software engineering?
Heterogeneity, delivery and trust.
1.Heterogeneity
Developing techniques for building software that can cope with
heterogeneous platforms and execution environments (for example a
system that runs both on Linux and windows OS);

2.Delivery
Developing techniques that lead to faster delivery of software without
compromising quality;

3.Trust
Developing techniques that demonstrate that software can be trusted by
its users especially those accessed remotely using web page or web
service interface.

Professional and ethical


responsibility
Software engineering involves wider responsibilities
than simply the application of technical skills.
skills
Software engineers must behave(perform) in an honest
and ethically responsible way if they are to be respected
as professionals.
Ethical behaviour is more than simply upholding the law.

Issues of professional
responsibility
Confidentiality

Engineers should normally respect the confidentiality of their


employers or clients irrespective of whether or not a formal
confidentiality agreement has been signed.

Competence

Engineers should not misrepresent their level of competence. They


should not knowingly accept work which is beyond their competence.
Intellectual property rights
Engineers should be aware of local laws governing the use of intellectual
property such as patents, copyright, etc. They should be careful to ensure that
the intellectual property of employers and clients is protected.

Computer misuse

Software engineers should not use their technical skills to misuse other peoples
computers. Computer misuse ranges from relatively trivial (game playing on an
employers machine, say) to extremely serious (dissemination of viruses).

1.2 Two Orthogonal view of


software.
1. Traditional
2. Modern(Object oriented)

Traditional

Views software as a collection of programs(functions) and


isolated data
Program=algorithm + data structure

Object Oriented
Focus on object which combines data and
functionality

1.3 Object oriented system


development methodology
Is a way to develop a software by building self
contained modules or objects that can be easily
replaced, modified & reused
In object oriented, software is a collection of discrete
objects that encapsulate their data as well as
functionalities to model the real world objects.
In object oriented system every thing is an object &
each object is responsible for itself.


Example
Every window application needs window object that can open
themselves on a screen and either display something or
accept input.
A window object is responsibility for things like opening, sizing
and closing itself. Frequently, when a window display
something that something is also an object.

1.4 Why object oriented?


Easier to adapt to changing requirements, easier to maintain, more
robust and promotes greater design and code use.
High level of abstraction
Top down: abstraction at function level
OO: abstraction at object level (since objects encapsulate both data(attribute)
and function (method).

Seamless transition among different phases of software development


Encourage good programming techniques
Changing one class cannot affect the other
Nothing is magical

Promotion of reusability

Because objects are directly modeled from real world problem domain each
object stands by itself or within a small circle of peers(other objects)
Inheritance(only difference and enhancement is needed to be designed and
coded)

1.5 Overview of the unified


approach.
Over the past decade, Grady Booch, James Rumbaugh,
and Ivar Jacobson have collaborated to combine the
best features of their individual object-oriented analysis
and design methods into a unified method. The result,
called the Unified Modeling Language (UML), has
become widely used throughout the industry.
UML is a generic broad language enabling the key
aspects(features) of software development to capture
on paper.

1.6 An object oriented


philosophy
Software development is dynamic and always
undergoing major changes
Today various number of tools and methodologies are
available for software development

Reading assignment
Read about an object oriented philosophy from the book
OOSD-Alibahrami: pages- 14 & 15

1.7 Basic concept of object


Classes are used to distinguish one type of object from
another
In the context of object oriented systems, a class is a
set of objects that share a common structure and a
common behavior
A single object is simply an instance of a class
The chief role of a class is to define proprieties and
procedures(the sate and behavior ) and applicability of
its instance

Example


The instructions responded by each of those instances o
employee are managed by the class .
The data associated with a particular object is managed
by the object itself

Attributes object state and


properties.
Properties represent the state of an object

Object behavior and methods


When we talk about car , we can drive a car
When we talk about horse, we can ride a horse
In the object model object behavior is described in
methods or behaviors
A method implements the behavior of an object

Abstraction, Encapsulation, And


Information Hiding
Instead of saying we determined what a class knows
and does, we say we "abstracted" the class. Instead of
saying we designed how the class will accomplish these
things, we say we "encapsulated" them. Instead of
saying we designed the class well by restricting access
to its attributes, we say we have "hidden" the
information.

Abstraction
The world is a complicated place. To deal with that
complexity we form abstractions of the things in it. For
example, consider the abstraction of a person. From the
point of view of a university, it needs to know the
person's name, address, telephone number, social
security number, and educational background. From the
point of view of the police, they need to know a person's
name, address, phone number, weight, height, hair
color, eye color, and so on. It is still the same person,
just a different abstraction, depending on the application
at hand.


Abstraction is an analysis issue that deals with what a class
knows or does. Your abstraction should include the
responsibilities, the attributes, and the methods of interest to
your applicationand ignore the rest. That is why the
abstraction of a student would include the person's name and
address, but probably not his or her height and weight. OO
systems abstract only what they need to solve the problem at
hand. People often say abstraction is the act of painting a
clear box around something: you are identifying what it does
and does not do. Some people will also say that abstraction is
the act of defining the interface to something. Either way,
you are defining what the class knows and does.

Encapsulation
Although the act of abstraction tells us that we need to store a
student's name and address, as well as be able to enroll
students in seminars, it does not tell us how we are going to do
this. Encapsulation deals with the issue of how you intend to
modularize the features of a system. In the object-oriented
world, you modularize systems into classes, which, in turn, are
modularized into methods and attributes. We say that we
encapsulate behavior into a class or we encapsulate
functionality into a method.
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.


Encapsulation is a design issue that deals with how
functionality is compartmentalized within a system. You
should not have to know how something is implemented
to be able to use it. The implication of encapsulation is
that you can build anything anyway you want, and then
you can later change the implementation and it will not
affect other components within the system (as long as
the interface to that component did not change).


People often say encapsulation is the act of painting the box black:
you are defining how something is going to be done, but you are
not telling the rest of the world how you are going to do it. In other
words you are hiding the details of the implementation of an item
from the users of that item. For example, consider your bank. How
does it keep track of your account information, on a mainframe, a
mini, or a PC? What database does it use? What operating system?
It does not matter, because it has encapsulated the way in which it
performs account services. You just walk up to a teller and initiate
whatever transactions you want. By hiding the details of the way it
has implemented accounts, your bank is free to change that
implementation at any time, and it should not affect the way
services are provided to you.

Information Hiding
To make your applications maintainable, you want to restrict
access to data attributes and some methods. The basic idea
is this: if one class wants information about another class, it
should have to ask for it, instead of taking it. When you think
about it, this is exactly the way the real world works. If you
want to learn somebody's name, what would you do? Would
you ask the person for his name, or would you steal his wallet
and look at his ID? By restricting access to attributes, you
prevent other programmers from writing highly coupled code.
When code is highly coupled, a change in one part of the
code forces you to make a change in another, and then
another, and so on.

Example: the driver's interface for a


car

The abstraction is how you work with the wheel,


pedals, and gearshift to drive a car. Encapsulation
allows various carmakers to provide a consistent
interface, although each brand of car is built
differently. Information hiding is represented by the
fact that although the oil is kept at a specific pressure
within the engine the driver does not know what the
exact pressure is. In other words, information about

Inheritance
Inheritance models "is a", "is kind of", and "is like" relationships,
enabling you to reuse existing data and code easily.
Example
Once you have the class Person defined, you then make Student and
Professor inherit from it. You would say Person is the superclass of both
Student and Professor, and Student and Professor are the subclasses of
Person. Everything that a superclass knows or does, the subclass
knows or does free without writing extra code. Actually, for this
example, you would need to write two lines of code, one saying
Student is a subclass of Person, and another saying Professor is a
subclass of Person; therefore, it is almost free. Because Person has a
name, address, and telephone number, both Student and Professor
also have those attributes. Because Person has the ability to drive a
vehicle, so do the classes Student and Professor.

Inheritance Tips and Techniques


Look for similarities
Look for existing classes
Follow the sentence rule
Inherit everything.

Abstract and Concrete Classes


the class Vehicle is marked as abstract whereas Airplane and
Car are not. We say Vehicle is an abstract class, whereas
Airplane and Car are both concrete classes. The main difference
between abstract classes and concrete classes is that objects
are instantiated (created) from concrete classes, but not from
abstract classes. For example, in your problem domain, you
have airplanes and cars, but you do not have anything that is
just a vehicle (if something is not an airplane or a car, you are
not interested in it). This means your software will instantiate
airplane and car objects, but will never create vehicle objects.
Abstract classes are modeled when you need to create a class
that implements common features from two or more classes.

THANKS!

You might also like