Hawassa University Daye Campus
DEPARTMENT OF COMPUTER SCIENCE
Software Engineering
Compiled by Talegeta G.
Chapter One
Overview of Software Engineering
Now a day the use of computers is growing very rapidly. They are used in
areas such as
Business applications,
Scientific work,
Video games,
Air traffic control,
Missile control,
Hospital management,
Airline reservations,
Medical diagnostic equipment etc.
Probably no discipline that does not use computer systems now.
With this increased use of computer, the need for software is increasing.
What is Software?
Computer programs and associated documentation
A Program:- an executable code, which serves some computational purpose.
Software is a set of instructions to acquire inputs and to manipulate them to
produce the desired output.
The set of computer programs, procedures, and associated documents
(flowcharts, manuals, etc.) that describe the programs and how they are to be
used.
A collection of programs whose objective is to enhance the capabilities of the
hardware.
What is Software engineering ?
Software engineering is an engineering branch associated with
development of software product using well-defined scientific:
principles,
Methods
procedures.
It is an engineering discipline that is
concerned with all aspects of software
production.
Outcome of SE: software product which is:
Efficient
Reliable
What is Software engineering ?
Software engineering is the establishment and use of sound
engineering principles in order to obtain economically
software that is reliable and efficiently run on real machines.
Software engineering is a modeling activity.
Software engineering is a problem-solving activity.
Software engineering is a knowledge acquisition activity.
Software engineering is a rationale-driven activity.
What are the attributes of good software?
The software should deliver the required functionality and
performance to the user and should be maintainable, dependable and
usable.
Maintainability
Software must evolve to meet changing needs
Dependability
Efficiency
Software should not make wasteful use of system resources
Usability
Software must be usable by the users for which it was designed
What are the key challenges facing software engineering?
Legacy systems
majority of software systems that use today developed many years yet,
so there is challenge of maintaining and updating this software .
Heterogeneity
Systems are required to operate as distributed techniques that include a
mix of hardware and software.
Delivery
Many traditional software engineering techniques are time-consuming,
so there is challenge of shortening delivery times for large and complex
systems without compromising system quality.
Risk challenge
Dealing with the increased complexity of software needed for new
applications.
Security, Trust and Scale
Two Orthogonal Views of the Software
Two software development methodologies/Approaches, that are
used to analyze, design and develop software systems. Both have
some similarities as well as differ in a number of ways.
Object-oriented Systems Development methods differ from
traditional development techniques in that
The traditional development techniques view software as a
collection of programs (or functions) and isolated data.
- Focuses on data and functions.
Here Algorithms + Data structures = Programs
“A software system is a set of mechanisms for performing certain
Object-Oriented Approach
OO system development approach instead of separating systems into
data and functionality, Focuses on objects that combines data and
functionality.
Object oriented systems development develop software by building
objects that can be:
Easier to adapt changes/ modify
Easier to maintain
Promote greater design and code reuse
Simplifies the problem of integrating components to configure large
Object-Oriented Approach…..
1. Focus on objects: by modeling them as instances of classes that
encapsulate both data and behavior.
2. Bottom-up approach: using bottom-up approach builds complex
systems from smaller one.
3. Object-centered: OOAD focuses on the objects that make up a
software system, modeling their relationships and interactions.
4. Emphasis on object-oriented design patterns: OOAD emphasizes
the reuse of objects and object-oriented design patterns, reducing
the amount of code that needs to be written and improving the
quality and consistency of the software
10
Software development process models
Software processes
A process is an organized set of activities, which transforms inputs to
outputs.
A software process is a sequence of activities that leads to the production of
a software product.
The systematic approach that is used in software engineering is sometimes
called a software process.
We can use synonyms of process such as: procedure, method, course of
action, etc.. Software engineering, as a discipline, has many processes.
Software process: organizing a structured set of activities to develop software
systems.
….cont’d
♥ These processes help in performing different software engineering activities
in an organized manner.
♥ There are many different software processes but all must include four
activities that are fundamental to software engineering:-
1.Software specification: - Customers and engineers define the software that
is to be produced the functionality of the software and constraints on its
operation must be defined.
2. Software design and implementation: - designed and programmed; the
software to meet the specification must be produced.
3. Software validation: - where the software is checked to ensure that it is
….cont’d
4. Software evolution: - where the software is modified to reflect
changing customer and market requirements.
The team listens to customer feedback and changing the system
in response to changing customer needs for better functionality.
Characteristics process
Produces intermediate and final products
Each process activity has entry and exit criteria
Activities are organized in sequence, so timing is clear
Each process guiding principles, including goals of each activity
Uses resources, subject to set of constraints (such as schedule, no.
of people working )
May be composed of sub-processes with hierarchy or links
Software Development Life Cycle (SDLC)
The software development lifecycle begins with the identification of a
requirement for software and ends with the formal verification of the
developed software against that requirement.
So SDLC goes through a series of phases. It consists of a detailed plan
describing how to develop, maintain, replace and alter or enhance specific
software.
The life cycle defines a methodology for improving the quality of software
and the overall development process.
….cont’d
The SDLC aims to produce a high quality software that meets or exceeds
client/customer expectations, reaches completion within times and cost
estimates.
The SDLC is a framework defining tasks performed at each step in the
software development process.
There are many SDLC used during software development process. SDLC is
used to
Helps to understand the entire process
Enables planning of resources in advance
Enforces a structured approach to development
Helps to track progress of the system
….cont’d
♥ The software development life-cycle can be divided into 5-9 phases:
Generally The SDLC is a structured approach, it uses data-oriented
approach.
1. Planning/ Requirements Analysis
Planning usually happens after there is an innovation and initiation that
come up from group of business and-users or sponsor whom identify a
need or an opportunity.
Planning is the most important and fundamental stage in SDLC.
This information is then used to plan the basic project approach and to
conduct product feasibility study in the economical, operational and
technical areas.
Planning for the quality assurance requirements and identification of
the risks associated with the project is also done in the planning stage.
….cont’d
During this activity the developer attempts to understand the problem and
delimit its scope. Feasibility study focused on:
Economic feasibility
Operational feasibility
Technical feasibility
Political feasibility
Schedule feasibility
2. Design
Once the requirement analysis is done the next step is to clearly define and
document the product requirements and get them approved from the
customer or the market analysts.
This is done through Software Requirement Specification (SRS).SRS
document which consists of all the product requirements to be designed and
developed during the project life cycle.
SRS is the reference for product architects to come out with the best
architecture for the product to be developed.
Based on the requirements specified in SRS, usually more than one design
approach for the product architecture is proposed and documented in a
Design Document Specification (DDS).
3. Development (coding)
In this stage of SDLC the actual development starts and the product is built.
The programming code is generated as per DDS. If the design is performed in
a detailed and organized manner, code generation can be accomplished
without much hassle.
Developers have to follow the coding guidelines defined by their organization
and programming tools like compilers, interpreters, debuggers etc. are used to
generate the code.
Different high level programming languages such as C, C++, Pascal, Java and
PHP are used for coding.
4. Testing
This stage is usually a subset of all the stages as in the modern SDLC models, the
testing activities are mostly involved in all the stages of SDLC.
However this stage refers to the testing only stage of the product where products
defects are reported, tracked, fixed and retested, until the product reaches the quality
standards defined in the SRS.
Testing is the major quality-control measure used during software
development.Testing is done by the programmers, end-users and quality assurance
experts.
Programmers know the best of how the program works and therefor they can identify
the most vulnerable areas of the software.
End-users would pay more attentions to their routine tasks which helps to ensure the
5. maintenance
Once the product is tested and ready to be deployed it is released
formally in the appropriate market.
The product may first be released in a limited segment and tested in the
real business environment user acceptance testing (UAT).
This is the final life cycle phase (deploy and maintenance) the software
is put into use.
Maintenance involves correcting errors which were not discovered in
earlier stages of the life cycle, improving the implementation of system
units and enhancing the system’s services as new requirements are
discovered.
Software Development Life cycle Models
Software Development Life Cycle is a well-defined, structured sequence of
stages in software engineering to develop the intended software product.
A process model (also called software life cycle model ) is a descriptive and
diagrammatic representation of the software life cycle.
There are various software development life cycle models defined and
designed which are followed during software development process.
These models are also referred as Software Development Process Models
(SDPM).
….cont’d
♥ Each process model follows a series of steps unique to its type, in order to
ensure success in process of software development.
♥ There are a number of different models for software development lifecycles.
Waterfall model
prototype model
incremental model
V-shaped model
Spiral model
The (Rational) Unified Process
….cont’d
Waterfall Model
The Waterfall Model was first process model to be introduced. It is also
referred to as a linear-sequential life cycle model.
It is very simple to understand and use. The waterfall model is consistent
with other engineering process models and documentation is produced at
each phase.
The waterfall model is an example of a plan-driven process—in principle,
you must plan and schedule all of the process activities before starting
work on them.
In a waterfall model, each phase must be completed before the next phase
….cont’d
The common software development phases are as follows:
1. Requirements Specification
The aim of the requirements analysis and specification phase is to
understand the exact requirements of the customer and to document them
properly.
….cont’d
In this phase consists of two distinct activities, namely
Requirements gathering and analysis
Requirements specification
Requirements gathering activity is to collect all relevant information
from the customer regarding the product to be developed.
This is done to clearly understand the customer requirements so that
incompleteness and inconsistencies are removed.
The requirements analysis activity is begun by collecting all relevant
data regarding the product to be developed from the users of the product
and from the customer through interviews and discussions.
….cont’d
During this activity, the user requirements are systematically organized into a
Software Requirements Specification (SRS) document.
The customer requirements identified during the requirements gathering and
analysis activity are organized into a SRS document.
The important components of this document are functional requirements, the
nonfunctional requirements, and the goals of implementation.
2. Design
The goal of the design phase is to transform the requirements specified
in the SRS document into a structure that is suitable for
implementation in some programming language.
In technical terms, during the design phase the software architecture is
derived from the SRS document.
Assigning responsibilities to objects and specifying detailed dynamics
of their interactions under different usage scenarios.
Two distinctly different approaches are available: the traditional
Implementation /Coding
The purpose of the coding phase (sometimes called the implementation
phase) of software development is to translate the software design into source
code.
Each component of the design is implemented as a program module.
Testing
During this phase, each module is unit tested to determine the correct
working of all the individual modules.
It involves testing each module in isolation as this is the most efficient way
to debug the errors identified at this stage.
Deployment and Maintenance
Deployment: is providing directions for installing the delivered software
into the local computing environment, configuring operating systems
parameters and user access privileges, and running diagnostic test cases to
assure the viability of basic system operation.
Maintenance: of a typical software product requires much more than the
effort necessary to develop the product itself.
Maintenance involves performing any one or more of the following three
kinds of activities:
….cont’d
Corrective maintenance is correcting errors that were not
discovered during the product development phase.
Perfective maintenance is improving the implementation of the
system, and enhancing the functionalities of the System.
Porting the software to work in a new environment. For example,
porting may be required to get the software to work on a new
computer platform or with a new operating system. This is called
adaptive maintenance.
Prototype Model
A prototype is a toy implementation of the system. A prototype
usually exhibits limited functional capabilities, low reliability,
and inefficient performance compared to the actual software.
A prototype is usually built using several shortcuts. The shortcuts
might involve using inefficient, inaccurate, or dummy functions.
Need for a prototype in software development
There are several uses of a prototype. An important purpose is to
illustrate the input data formats, messages, reports, and the
interactive dialogues to the customer.
….cont’d
This is a valuable mechanism for gaining better understanding of the
customer’s needs:
How the screens might look like
How the user interface would behave
How the system would produce outputs
Another reason for developing a prototype is that it is impossible to
get the perfect product in the first attempt.
Many researchers and engineers advocate that if you want to
develop a good product you must plan to throw away the first
version.
….cont’d
The experience gained in developing the prototype can be used to develop
the final product. A prototype of the actual product is preferred in
situations such as:
User requirements are not complete
Technical issues are not clear
3/2/2018
Incremental Model
The incremental model may be viewed as a modification to the waterfall
model.
As software projects increased in size, it was recognized that it is much
easier, and sometimes necessary.
To develop the software if the large projects are subdivided into smaller
components, which may thus be developed incrementally and iteratively.
In the incremental model the components were developed in an overlapping
fashion.
The components all had integrated and then tested as a whole in a final
system test.
….cont’d
The incremental model provided a certain amount of risk containment.
If any one component ran into trouble, the other component were able to still
continue to be developed independently.
V-shaped Model
The V - model is SDLC model where execution of processes
happens in a sequential manner in V-shape.
It is also known as Verification and Validation model.
V - Model is an extension of the waterfall model and is based on
association of a testing phase for each corresponding development
stage.
Verification is a process of determining if the software is designed
and developed as per the specified requirements.
Validation is the process of checking if the software (end product)
has met the client's true needs and expectations.
This means that for every single phase in the development cycle
there is a directly associated testing phase.
This is a highly disciplined model and next phase starts only after
completion of the previous phase.
Under V-Model, the corresponding testing phase of the
development phase is planned in parallel.
….cont’d
V-Shaped SDLC Model
So there are Verification phases on one side of and Validation phases on the
other side. Coding phase joins the two sides of the V-Model
Verification Phases
Requirement analysis:
This is the first phase in the development cycle where the product
requirements are understood from the customer perspective.
This is a very important activity and need to be managed well, as
most of the customers are not sure about what exactly they need.
The acceptance test design planning is done at this stage as
business requirements can be used as an input for acceptance
testing.
….cont’d
Product requirement and specification analysis:
Once you have the clear and detailed product requirements, it’s
time to design the complete system.
System design would comprise of understanding and detailing the
complete hardware and communication setup for the product under
development.
System test plan is developed based on the system design.
….cont’d
Architectural high level design:
Architectural specifications are understood and designed in this
phase.
Usually more than one technical approach is proposed and based on
the technical and financial feasibility the final decision is taken.
System design is broken down further into modules taking up
different functionality. This is also referred to as High Level Design
HLD.
Integration tests can be designed and documented during this stage.
Detail design:
In this phase the detailed internal design for all the system
modules is specified, referred to as Low Level Design LLD.
It is important that the design is compatible with the other
modules in the system architecture and the other external systems.
Unit tests are an essential part of any development process and
helps eliminate the maximum faults and errors at a very early
stage.
Unit tests can be designed at this stage based on the internal
module designs.
Coding Phase
The actual coding of the system modules designed in the design
phase is taken up in the Coding phase.
The best suitable programming language is decided based on the
system and architectural requirements.
The coding is performed based on the coding guidelines and
standards.
The code goes through numerous code reviews and is optimized
for best performance before the final build is checked into the
repository.
Validation Phases
Unit testing:
♥ Unit testing is the testing at code level and helps eliminate bugs at an early
stage, though all defects cannot be uncovered by unit testing.
Integration testing:
♥ Integration testing is associated with the architectural design phase.
System testing:
♥ System testing is directly associated with the System design phase.
Acceptance testing:
♥ Acceptance testing is associated with the business requirement analysis
phase and involves testing the product in user environment.
Reading Assignment!!!
Spiral model
The (Rational) Unified Process
Agile Model
Software Process assessment model
A software process assessment is a disciplined examination of the
software processes used by an organization, based on a process
model.
Process assessment examines whether the software process is
effective and efficient in accomplishing the goals
The assessment includes the identification and characterization of
current practices, identifying areas of strengths and weaknesses,
and the ability of current practices to control or avoid significant
causes of poor (software) quality, cost, and schedule.
….cont’d
A software assessment (or audit) can be of three types:
A self-assessment (first-party assessment): - is performed internally by an
organization's own personnel.
A second-party assessment: - is performed by an external assessment team or the
organization is assessed by a customer.
A third-party assessment: - is performed by an external party or (e.g., a supplier
being assessed by a third party to verify its ability to enter contracts with a
customer).
One of the key organizations that has contributed, advanced, and advocated the
software development processes is the software engineering institute (SEI), and
another organization that has contributed to software engineering is the
Software Metrics
Software metrics is a standard of measure that contains many
activities which involve some degree of measurement.
Metrics is a quantitative measure of the degree to which a system,
component or process possesses a given attribute. It relates
measure in some way.
Example: defects found in component testing/line of code/ of
code tested.
….cont’d
SW Metrics refers to a range of measurements for computer software that enable
software people to gain insight into the project:
To improve the Process and the Product
Assist in Estimation
Productivity Assessment
Quality Control
Project Control
Human effort used
Number of errors found before the software release
Software metrics can be classified into three categories: product metrics,
….cont’d
♥ Product metrics: - describe the characteristics of the product such as size,
complexity, design features, performance, and quality level.
Examples: code, design docs, test plan, user manual LOC (line of code), # of
objects, # of pages, # of files.
♥ Process metrics: - can be used to improve software development and
maintenance.
Examples include the effectiveness of defect removal during development, the
pattern of testing defect arrival, and the response time of the fix process.
♥ Project metrics:- describe the project characteristics and execution. Examples
include the number of software developers, the staffing pattern over the life
Reasons for measuring SW processes, products, and resources:
♥To characterize: To gain understanding of Product, Process, and
to establish baseline for future comparisons.
♥To evaluate: To determine status within the plan
♥To predicate: So that we can plan. Update estimates
♥To improve: We would have more information “quantitative” to
help determine root causes.
….cont’d
Scope of Software process Metrics
Software metrics contains many activities which include the following:
Cost and effort estimation,
Productivity measures and model,
Data collection,
Quantity models and measures, Reliability models, Performance and
evaluation models, Structural and complexity metrics, Capability – maturity
assessment, Management by metrics, Evaluation of methods and tools.
1.2. 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.
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.“ 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.
….cont’d
Object-oriented methods enable us to create sets of objects that works
together synergistically to produce software that better model their problem
domains.
The systems are easier to adapt to changing requirements, easier to
maintain, more robust, and promote greater de-sign and code reuse.
Object-oriented development allows us to create modules of functionality.
1.3. Importance of Object Orientation
Allows Higher level of abstraction
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.
This makes designing, coding, testing, and maintaining the system much
simpler.
….cont’d
• On the other hand, the object-oriented approach, essentially uses 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 clear, more robust system development.
1.4. Overview of the Unified Approach (UA)
UA is a methodology for software development is based on
methodologies by Booch, Rumbaugh, Jacobson and Odell.
It tries to combine the best practices, processes, and guidelines along
with UML notations & diagrams for better understanding object-
oriented concepts and system development.
UML- stands for Unified Modeling Language.
is a set of notations and conventions used to describe and model an
application.
is a modeling language or graphical/diagrammatic notation for
….cont’d
Different from the other common programming languages like C+
+, Java, COBOL etc. UML is a pictorial language used to make
software blue prints.
But, the UML does not specify a methodology or what steps to
follow to develop an application; that would be the task of the UA.
The use case represents a typical interaction between a user and a
computer system to capture the users' goals and needs.
1.5. Object Oriented Concepts
What is Object Orientation ?
Object Orientation is about viewing and modelling the
world/system as a set of interacting and interrelated objects.
The universe consists of interacting objects
Describes and builds systems consisting of objects
Object- is an instance or occurrence of a class that are created,
modified and destroyed during the execution of the system.
is a person, place, thing, concept, screen, report that is relevant to
the system.
is equivalent to a record in DB concept.
….cont’d
each object has its own
*Identity- distinguish from other object in the system.
*Attributes
*Behaviors
Objects are usually described as nouns.
Class- represents a collection of related objects.
- is a set of objects that share the same attributes and
behaviors.
is a template/prototype/design/blueprint from w/c objects
are created/instantiation
is equivalent to a table in DB concept.
Class name typically nouns and singular
….cont’d
Attributes-describes properties of an object (describe state/data of an
object)
- is a data element in the record
Method- can be thought as a function/procedure.
- describes how an object performs a task.(describes behavior of
an object)
- access and modify attributes of an object.
Instantiation- is the process of creating an object.
- to create an object use classname object = new classname();
E.g. course c=new course();//creating object c for class course
….cont’d
Inheritance- a class acquires properties of another class.
is the way by w/c child/derived class gets the properties of
parent/super class.
Allows classes to share and reuse behaviors and attributes.
Inheritance can be
single inheritance- when a class directly inherits from only
one class.
multiple inheritance- when a class directly inherits from
more than one class.
….cont’d
Polymorphism- poly-many and morph- form.( the ability to take multiple
forms)
- Objects that can take many different forms.
- Means that the same method/operation may behave
differently on different classes.
- is the ability to dynamically choose a method at run time.
….cont’d
Achieved through:
1. Method overloading- defining two or more methods with the same
name within the same class but in different signature(number of
arguments, type of arguments and order of parameters)
double computeArea(double length, double width);
double computeArea(double radius);
2. Method overriding- defining methods in super and sub classes with
the same signature. Accessed by super key word i.e.
super.variablename; and super.overridemethod();
….cont’d
Encapsulation- is the process of binding both attributes and methods
together in to a single entity called object.
- Through encapsulation, the internal details of a class can
be hidden from outside.
Information Hiding- The principle of restriction or concealing of
external access to attributes(data).
- for example C++ and java has a very general encapsulation
protection mechanism with public, private and protected
members.
- Members can be data and method.
THANK YOU!