Software Engineering - CH 1 - Introduction - Handout
Software Engineering - CH 1 - Introduction - Handout
Chapter One
Overview of Software Engineering
Chapter Objectives
Chapter Contents
1.1. Introduction
(Definition of software, Characteristics of software, Components of software, Software
applications, Definition of software engineering, History of software engineering,
Software complexity, Why software is inherently complex, The need for an engineering
approach, Goal of software engineering, Role of software engineer, Principles of
software engineering, Relationship between software engineering and computer
science, Relationship between software engineering and other disciplines)
1.2. Software Life Cycle
(Feasibility study, Requirement analysis and specification, Design and specification,
Coding and module testing, Integration and system testing, Delivery and maintenance)
1.3. Software Process Models
(Waterfall model, Prototyping model, Spiral model, concurrent development model)
1.1. Introduction
1.1.1. Definition of Software
Software can be described as:
(i) Instructions (computer programs) that when executed provide desired function and
performance. (When we execute instructions we can perform desired functions and
maintain the performance).
(ii) Data structures that enable the programs to adequately manipulate information for the
required results.
(iii) Documents that describe the operation and use of the programs for the better
understandability of the user to the program.
1.1.2. Characteristics of Software
Software is a logical element when compared with the physical element hardware. It has
characteristics that are considerably different than those of hardware.
1
Both activities are dependant on people, but the relationship between people applied
and work accomplished is entirely different.
Both activities require the construction of a “product” but the approaches are different.
Software costs are concentrated in engineering, i.e., software projects can not be
managed as if they are manufacturing projects.
b. Software does not “Wear Out”
Hardware have tendency of wearing out with time but software don’t wear out. But software
deteriorates with time as with time new bugs are found out in the software. This introduces
patch work to the software in order to remove these bugs. This leads to entropy i.e., the
software deteriorate in the conceptual sense and thus become outdated for an organization.
In theory, therefore, the failure rate curve for software should take the form of the “idealized
curve” shown in Fig 1.2. Undiscovered defects will cause high failure rates early in the life of
a program. However, these are corrected (ideally, without introducing other errors) and the
curve flattens as shown. The idealized curve is a gross over simplification of actual failure
models for software. However, the implication is clear, software doesn’t wear out. But it does
deteriorate.
This seeming contradiction can best be explained by considering the “actual curve” shown in
Fig 1.2. During its life, software will undergo change (e.g. maintenance). As the changes are
made, it is likely that some new defects will be introduced, causing the failure rate curve to
spike as shown in Fig 1.2. Before the curve can return to the original steady state failure rate,
another change is requested, causing the curve to spike again. Slowly, the minimum failure
rare level begins to rise i.e., the software is deteriorating due to change.
Actual Curve
Failure Failure
Rate Rate
Idealized Curve
Time Time
Fig 1.1. Hardware failure curve Fig 1.2. Software idealized and actual failure curve
2
c. Software is custom built.
Design engineer draws a simple schematic of the components and is implemented so that it can
be reused in many different programs. We built scientific subroutine libraries that were
reusable in broad array of engineering and scientific applications. Software is customized
generally as they need to be developed according to the requirements of the user.
3
2) Real-time Software – software that analyses, monitors, controls real-world events that
occur in real time. Elements include
Data gathering component that collects and formats information from an external
environment.
Analysis component that transforms information as required by the application.
Control / output component that responds to the external environment.
Monitoring component that co-ordinates all other components so that real-time
response can be maintained (ranging from 1 millisecond to 1 second)
3) Business Software – this is the largest single software application area.
Discrete systems like payroll accounts receivable/ payable, inventory have evolved
into MIS (Management Information System) that access one or more large
databases containing business information.
Applications here restructured existing data in a way that facilitates business
operations or management decision-making.
Also contain interactive computing (eg., point-of-sale processing)
4) Engineering & Scientific Software – have been characterized by number of algorithms.
Applications Range from
Astronomy to volcanology
Automotive stress analysis to space shuttle orbital dynamics
Molecular biology to automated manufacturing
Computer–aided design, system simulation and other interactive applications have
begun to take on real-time and system software characteristics.
5) Embedded Software – resides in the read-only memory and is used to control products
and systems for the consumer and industrial markets.
Can perform very limited and esoteric functions (e. keypad control for microwave
oven)
Provide significant function and control capability (e., digital functions in an
automobile such as fuel control, dashboard displays and breaking systems)
6) Personal Computer Software – this has taken the world into a new era.
Word processing, Spread sheets, Computer graphics, Multimedia, Entertainment,
Database management & database access, Personal and business financial
applications, External network.
7) Web based Software – web pages retrieved by a browser are software that incorporates
executable instructions (e.g. HTML, Java, Perl) and data (e.g. hypertext and variety of
visual and audio formats).
The network becomes a massive computer providing an almost unlimited software
resource that can be accessed by anyone.
8) Artificial Intelligence Software – makes use of non-numerical algorithms to solve
complex problems that cannot be done as straightforward analysis.
Expert systems (called as knowledge based systems), Pattern recognition (image
and voice), Games, Artificial neural networks.
1.1.5. Definition of software engineering
Software Engineering is a branch of computer science that deals with the construction of high
quality software systems by a team of professionals. A good definition of software engineering
which captures its essence is given by Parnas as “a multi-person construction of multi-version
4
software.” Or it is a systematic approach to the development, operation, maintenance and
retirement of software.
(i) The application of a systematic, disciplined, quantifiable approach to the development,
operation and maintenance of software i.e., the application of engineering to software. And
(ii) The study of approaches.
Software engineering is the establishment and use of sound engineering principles in order to
obtain software economically, which is reliable and works efficiently on real machines.
7
and more than one thread of control runs on a digital computer. Therefore, the
application is modeled in discrete form. Unlike, analog systems, in which small
variations inputs or certain intermediate states do not normally result in
unexpectedly large variations in the output, discrete systems may be quite
unpredictable. A small change in an input or event changes the state of the
system totally. If not properly designed, this change may result in quite
unexpected output.
1.1.9. The need for an engineering approach
It was in the middle to late 1960’s that truly large software systems were
attempted commercially. The complexity nature of the systems and how to
tackle them were not well understood. The attempt of scaling up the
techniques used by individual programmers of small systems to large systems
could not work. Large software system were over-budget and behind
schedule. Even after a long delay, they were found with substantial amount of
bugs and not meeting the expected requirements. This has coined the term
software crisis.
8
a good programmer, be fluent in one or more programming
languages
well-versed in data structures and algorithms
The above are requirements for “programming-in-the-small”. But a software
engineer is involved in “programming in the large” which requires-
familiarity with several design approaches
ability to translate vague requirements and desires into precise
specifications,
ability to converse with the user of a system in terms of the
application rather than in “computerese.”
flexibility and openness to grasp, and become conversant with,
the essentials of different applications
the ability to move among several levels of abstraction at different
stages of the project, from specific application procedures and
requirements, to abstractions for the software system, to specific
design for the system, and finally to the detailed coding level
the ability of modeling. The software engineer must be able to build
and use a model of the application to guide choices of the many
trade-offs that he or she will face. The model is used to answer
questions about the behavior of the system and its performance.
Preferably, the model can be used by the engineer as well as the
user.
communication and interpersonal skills, as the engineer works in a
team
ability to schedule work, both for his or her own and that of others –
management
Generally, a software engineer is responsible for many things and is different
from a programmer. “Scientists measure their results against nature.
Engineers measure their results against human needs. Programmers ... don't
measure their results.
10
Generality
The principle of generality states that whenever you are asked to solve a certain problem, try to focus on
the discovery of a more general problem that may be hidden behind the problem at hand. It may happen
that the generalized problem is not more complex- it may even be simpler- than the original
problem. Being more general, it is likely that the solution to the problem has more potential for being
reused. It may even happen that the solution is already provided by some off-the-shelf package. Also, it
may happen that by generalizing a problem, you end up designing a module that is invoked at more than
one point of the application, rather than having several specialized solutions. Generality is an important
principle if our goal is to develop general tools or packages for the market.
Incrementality
Incrementality characterizes a process that proceeds in a step-wise fashion, in increments. The desired
goal is reached by successive closer approximation to it. Each approximation is reached by an increment
of the previous one.
Summary of software principle
The software engineering principles just discussed in the previous section are general principles
that should be applied to all phases of the software development process. Therefore, all of them are
applicable to the design phase.
The principle of rigor and formality inspires us to adopt appropriate notations of describing the resulting
design Separation of concerns, modularity, and abstraction are used to tame the complexity of the
design activity and produce designs that are characterized by high level of understandability, to enhance
our confidence in the correctness of our solutions. Finally, anticipation of change and incrementality
will allow us design systems that can evolve easily as requirements change, or systems that can be
enriched progressively in their functions, starting from a small initial version with only limited
functionality.
1.1.13. Relationship between software engineering and computer science
Standing now on its own as a discipline, software engineering has emerged as an important field of
computer science. Indeed, there is a synergistic relationship between it and many other areas in
computer science:
a. Programming languages: these are the central tools used in software development. The most
notable example of this influence on programming language is the inclusion of modularity
features, such as separate and independent compilation, and the separation of specification
from implementation, in order to support team development of large software. Programming is
a subject of software engineering. Programming is now an individualistic approach but
software engineering is more a process involving many people and resources also.
b. Operating systems: The influence of operating systems on software engineering is quite strong
primarily because operating systems were the first really large software systems built, and
therefore, they were the first instances of software that needed to be engineered. Many of the
initial software design ideas originated from early attempts at building operating systems.
c. Databases: databases represent another class of large software systems whose development has
influenced software engineering through the discovery of new design techniques. The most
important influence of the database field on software engineering is through the notion of “data
independence and integrity”, which is yet another instance of the separation of specification
from implementation.
11
d. Artificial intelligence: many software systems build in the artificial intelligence research
community are large and complex systems. But they have been different from other software
systems in significant ways. Many of them were built with only a vague notion of how the
system was going to work. The term “exploratory development” has been used for the process
followed in building these systems.
e. Theoretical models: this discipline has developed a number of models that have become useful
tools in software engineering. For example, finite state machines have served both as the basis
of techniques for software speciation and as models for software design and structure.
Communication protocols and language analyzers use finite state machines as their processing
models.
1.1.14. Relationship between software engineering and other disciplines
Software engineering can not be practiced in a vacuum. There are many problems that are not
specific to software engineering and have been solved in other fields.
a. Management Science: As in any kind of large, militiperson endeavor, we need to do project
estimation, project scheduling, human resource planning, task decomposition and assignment,
and project tracking. Additional personnel issues involve hiring personnel, motivating people,
and assigning the right people to the right tasks.
b. System engineering: this field is concerned with studying complex systems. The underlying
hypothesis is that certain laws govern the behavior of any complex systems composed of many
components with complex relationships. System engineering is useful when one is interested in
concentrating on the system, as opposed its individual components. Systems engineering tries
to discover common themes that apply to diverse systems- for example, chemical plants,
buildings, and bridges.
1.2. Software Development Life Cycle
Starting from the inception of the idea, until it is implemented and delivered and even after
that, a software system undergoes a gradual development and evolution process. This is
said to be the life cycle of the software and it is composed of different phases. Each phase
results in the development of either part of the software or something associated with it.
The earliest code-and-fix approach to software development could not help. In fact, it leads to
the recognition of software crisis and thus the birth of software engineering. Since then,
software engineering has tried to define different models for representing the software life
cycle. Software development life cycle comprises the following phases.
Feasibility study. Before the beginning of a development process of large software, one
has to conduct a feasibility study in order to assess and evaluate the costs and
benefits of the proposed application. Feasibility study tries to anticipate future
scenarios of the software development. Its result is a document that should contain at least
the following items: 1) a definition of the problem, 2) alternative solutions and their
expected benefits, 3) required resources, costs, and delivery dates in each proposed
alternative solution.
Requirement analysis and specification. Requirement analysis is usually the first step
of any large-scale software development done after a feasibility study. In this phase,
the functional and non-functional requirements of the software system are identified,
analyzed and then specified. The requirements in here are specified in end user terms.
12
Design and specification. The next step after requirement analysis and specification is to
design the software system which meets the specified requirements. This phase may be
divided into two sub phases: architectural or high-level design and detailed design.
In the architectural design, the engineer is concentrated on the overall modular
structure of the systems. The different modules that must be comprised the system are
defined without concentrating on their internal details. In the detailed design phase, each module
will be designed and by specifying its internal details.
Coding and module testing. Once all modules comprising the system are designed, each
will then be coded and tested independently. This is the phase, which produces the actual
code to be submitted to the customer.
Integration and system testing. The different modules developed and tested in the
previous phase are integrated and then tested in this phase. The integration and testing may
be done step-by-step in which some modules will first be integrated and tested, and when
successful, more modules will be added. Another way is to put all-modules together and
then test the whole system.
Delivery and maintenance. Once the system passes all the test phases, it is delivered to the
customer and enters a new phase- the maintenance phase. This is the phase in which
errors are corrected, the software is adapted to changing requirements and
environments. In this phase, the software is also perfected in terms of its
performances.
The waterfall lifecycle model is the most straightforward model and it is document driven. It views
software development as a series of processes that are expected to be done only once for the
project. They are to be done in the proper order and the results documented for input to subsequent
processes.
13
One of the most critical features of the Waterfall Model is that the phases do not overlap. Design
cannot begin until analysis is completed, and testing cannot begin until coding is completed.
Feasibility Study
Feasibility Study
Requirement Analysis
And Specification
Requirement Analysis
And Specification
Design and
Specification
Design and
Specification
Coding and
Module Testing
Coding and
Module Testing
Integration and
System Testingand
Integration
System Testing
Delivery
Delivery
Maintenance
Maintenance
i. Feasibility Study
Main aim is to determine whether developing the product is financially and technically
feasible. The purpose is to produce a feasibility study document that evaluates the costs
and benefits of the proposed application. It is highly dependent on the type of SW
developer and the application.
Document should contain
New project – much interaction is required between the user and the developer
Non- Functional Requirements : This may be classified into the following categories:
High level /architectural design: Deals with overall module structure and organization,
14
Detailed design: High level design is refined by designing each module in detail.
The design process translates requirements into a representation of the software that can be
assessed for quality before coding begins. Like requirements, the design is documented
and becomes part of the software configuration.
iv. Code generation
The design must be translated into a machine-readable form. The code generation step
performs this task. If design is performed in a detailed manner, code generation can be
accomplished mechanistically.
v. Testing
Once code has been generated, program testing begins. The testing process focuses on the
logical internals of the software, ensuring that all statements have been tested, and on the
functional externals; that is, conducting tests to uncover errors and ensure that defined
input will produce actual results that agree with required results.
Individual modules are tested before being delivered to the customers.
o Alpha Testing: Carried out by the test team inside the organization.
o Beta Testing: Performed by a selected group of friendly customers.
o Acceptance Testing: Performed by the customer to determine.
vi. Support
Software will undoubtedly undergo change after it is delivered to the customer. Change
will occur because errors have been encountered, because the software must be adapted to
accommodate changes in its external environment (e.g., a change required because of a
new operating system or peripheral device), or because the customer requires functional or
performance enhancements.
In other words, maintenance work involves performing any one/more of the following
activities:
o Corrective Maintenance : Correcting errors – not discovered during the product
development phase.
o Perfective Maintenance : Improving the implementation and enhancing the
functionalities according to customer’s requirements.
o Adaptive Maintenance : Porting the SW to a new environment.
Strengths of the Waterfall model
The model is well known by non-software parties making it easier to communicate.
It offers a disciplined approach to software development because all the steps of the project
It is a good model to use when requirements are well understood and are quite stable.
15
Weaknesses of the Waterfall model
The Model is inflexible for change as each phase results are frozen.
Length of time before anything usable by the customer is produced and the implied
phase before moving on. This is not always a realistic situation. It requires the engineer to
“freeze” the activities of each phase. Requirements are frozen while design is taking place.
To resolve this disadvantage, the Waterfall Model may sometimes include a "feedback
loop" where the engineer can return to a previous phase. This requires very strict
configuration management and change control.
Major decisions must be made early, when knowledge is at its least depth.
There is a tremendous pressure on testers to prove whether a product is ready or not for
release.
Requirements must be well-reviewed early. It is not always possible for the user to define
There is no early deliverable. This results in long waits before users can acquire the
the requirements and the implementations of those requirements are clearly understood and
at the beginning.
It works well for products that are well understood and whose technical methodologies are
also clear.
It also works well for projects that are repeats of earlier work such as migration, updates,
experience such as the case when the analytic reports are being developed for a Human
Resources Information System having had the experience of similar reporting in the
Payroll System.
1.3.2. Prototyping Model
Most software application development efforts often yield systems that are not totally usable. The
later releases of such products improve their use. This led to the development of a prototyping
model that is highly iterative in nature. It is mostly used for developing “proof of concept”
applications that are not completely usable. As the requirements get known, the system gets
refined.
In the case where requirements are not clear, Prototyping may be the most suitable approach. Such
situations as the following require prototyping:
Users do not have clearly defined procedures and processes
16
Systems are complex and are not amenable to clear analysis
Requirements are changing due to various reasons: markets, regulations, uncommitted
management, etc.
1.3.2.1. What is a Prototype?
It is a quickly developed, easily modifiable and extendible working model of the required
application. A prototype does not necessarily represent the complete system. It is not meant to. It is
only meant to start proving the validity of converting the user requirements into working designs.
In general terms, the Prototype Model follows these steps:
Requirements gathering
Quick design
Refine
Build prototype
Requirements
Customer
suggestio
ns Customer evaluation –
prototype
Acceptance by user
Design
Implement, Test
Maintain
missed.
Technological solutions are identified early.
17
The prototype can be used as a formal specification because it is tangible and well tried.
It secures the user because of the steady and visible progress
Prototyping development costs are offset by avoidance of the usual high cost of rework
and repair.
There will be many opportunities to reappraise requirements or rethink the design.
It is relatively simple to eliminate useless features.
Weaknesses of the Prototyping Model
The user may be led to believe that developing software is easy and would hence become
performance, look and feel, etc., all because the developer is concentrating on delivering
the required functions of the systems. Furthermore, inefficient algorithms may be used,
unsuitable development environments or testing may take place under unrealistic platforms
(Operating systems, database systems, etc). Addressing such issues at a later stage may be
cumbersome and inefficient.
Lack of early planning may cause project management problems: unknown schedules,
additional functions. This may take the project outside the scope of the feasible
requirements. If such extensions are crucial, this weakness becomes strength.
There is a tendency to postpone complex requirements till a later stage to achieve early
proof of concept. This may result in systems which may be difficult to modify.
Developers may be tempted to deliver a reasonably working prototype rather than a tightly
constantly changing
When users, for various reasons, do not have the capability of expressing their
requirements clearly or when they are reluctant to commit to a set of clear requirements.
The model is ideally suited for developing look and feel or user interfaces because such
features cannot be easily documented and are best seen when tested.
When user requires proof of concept
18
Evaluate alternatives and risks
Develop and test
Plan next phase
19
It remains the responsibility of the Project Manager to define and control the number of iterations
in the whole process.
Strengths of the Spiral Model
It is a realistic approach to the problems of medium to large scale software development
The main benefit of the spiral model is incorporation of project management methods such
analysis, both users and developers learn to respond and manage risks at each stage of the
project.
Weaknesses of the Spiral Model
It requires excellent project management skills. In addition, the project manager must be
Use of the spiral model may prevent inadequate or unusable software from being built,
resulting in the avoidance of rework and increasing trust between the customers and the
developers.
It demands expert knowledge of risk analysis and management which may not always be
available. Major risks uncovered at later stages may have drastic impacts on the final
result.
When to use the Spiral Model?
Projects that would benefit the most are those that would be built on untested assumptions.
Win-Win spiral process model is a model of a process based o theory W, which is a management
theory and approach “based on making winners of all of the system’s key stakeholders as a
necessary and sufficient condition for project success”.
1.3.4. RAD (Rapid Application Development) Model
It is an incremental software development process model that emphasizes an extremely
short development cycle.
→ Is a high-speed adaptation of linear sequential model in which rapid development is
achieved by using component-based construction.
→ If requirements are well understood, RAD process enables development team to create
a fully functional system within short periods of time.
RAD approach encompasses the following phases:
20
Fig 1.6. Rapid Application Development Model
21