Software Engineering
Software Engineering
CHAPTER – 1
1.0 Understand the basics of Software Engineering Designs & Life Cycle Models
In the early days of computer evolution, people used to work directly with the hardware
components of computer.(e.g. With vacuum tubes..) As we know that difficulty of working with
hardware components. The users of computer were expected same type interface mechanism.
Hence the rich user set of computers were planned to develop that interface mechanism in the form
of software. But they were not aware of the development process of software. So they tried without
any guidelines or predefined rule set to develop software.
Because of the lack of proper development strategies, documentations and maintenance plans, the
software system that was developed was costlier than before and also it took more time to develop
the entire system. The lines of codes were increased to a very large number, large code increasing
the complexity of the software and also there were no proper procedure to identify and rectify the
bugs or errors. So most of the times the system that was developed unusable by the customer
because of the complexity involving to use. Due to lack of maintenance after delivering to the
customer, no plans to overcome the bugs or errors occurred while in use. This situation is called
Software Crisis.
Software Crisis was a mess situation for software developers. So they have to redeem their
development process. By observing other department development structure,[e.g. Automobile
Industry..] various levels or stages in their development structure, the same type of approach had
been applied (or) implemented in software also. Hence, people were compelled to think about the
systematic approach to the development of software. This systematic approach given an
engineering perspective view to the software development, hence it is called as “software
engineering” [like Engineering Drawing].
A solution to the software crisis is software engineering.
1
Definition: “Software engineering is the application of disciplined, quantifiable approach to the
development Operation and maintenance of software”.
The following steps are applicable to the majority of software projects:
a) Communication: Involves heavy communication and collaboration with the customer
for requirements gathering and other related information.
b) Planning: Establishes a plan for the software engineering work that follows.
c) Modeling: This activity involves the creation of models that allow the developers and the
customers to better understand software requirements and the design that will achieve those
requirements.
d) Construction: combines the code generation and testing.
e) Deployment: The software is delivered to the customer who evaluates the delivered
product and provides feedback based on the evaluation.
Program:
Software product:
2
1.3 Understand the Evolution of Software Engineering design:
Programming languages are used to specify algorithmic steps in computer understanding format.
Programming languages are broadly classified into three types:
A mechanism can understand only 0’s and 1’s that is called machine level language. Working with
machine level language is very difficult.
In Assembly level language coding will be started with Mnemonics. An Assembler converts
Arithmetic Logic program into machine code.
With the introduction of semiconductor technology, the computers became smaller, faster, cheaper,
and reliable than their predecessors. One of the major developments includes the progress from
assembly language to high-level languages. Early high level programming languages such as
COBOL and FORTRAN came into existence. As a result, the programming became easier and
thus, increased the productivity of the programmers. However, still the programs were limited in
size and the programmers developed programs using their own style and experience.
High Level Languages are made coding closer to human readable. Compiler is to used convert
high level language programs into machine code.
a) Control Flow
b) Data Flow
3
1.3.3 Control Flow Design:
With the advent of powerful machines and high level languages, the usage of computers grew
rapidly: In addition, the nature of programs also changed from simple to complex. The increased
size and the complexity could not be managed by individual style. It was analyzed that clarity of
control flow (the sequence in which the program’s instructions are executed) is of great
importance. To help the programmer to design programs having good control flow
structure, flowcharting technique was developed. In flowcharting technique, the algorithm is
represented using flowcharts. A flowchart is a graphical representation that depicts the sequence
of operations to be carried out to solve a given problem.
Note that having more GOTO constructs in the flowchart makes the control flow messy, which
makes it difficult to understand and debug. In order to provide clarity of control flow, the use of
GOTO constructs in flowcharts should be avoided and structured constructs-
decision, sequence, and loop-should be used to develop structured flowcharts. The decision
structures are used for conditional execution of statements (for example, if statement). The
sequence structures are used for the sequentially executed statements. The loop structures are
used for performing some repetitive tasks in the program. The use of structured constructs
formed the basis of the structured programming methodology.
Structured programming became a powerful tool that allowed programmers to write moderately
complex programs easily. It forces a logical structure in the program to be written in an efficient
and understandable manner. The purpose of structured programming is to make the software
code easy to modify when required. Some languages such as Ada, Pascal, and dBase are
designed with features that implement the logical program structure in the software code.
The data structure-oriented design approach utilizes the data structures of the input data, internal
data (for example databases) and output data to develop software. In the data structure-oriented
approach, the emphasis is on the object, which is the d ata. The structure of information, called
data structure, has an important impact on the complexity and efficiency of algorithms designed
to process information.
Software design is closely related to the data structure of the system, for example, alternative
data will require a conditional processing element, repetitive data will require a control feature
for repetition and a hierarchical data structure will requ ire a hierarchical software structure. Data
structure-oriented design is best utilized in applications that ave a well-defined, hierarchical
structure of information.
As both data flow and data structure oriented design approaches are based on considerations in
the information domain, there are similarities between both approaches. Both depend on the
analysis step to build the foundation for later steps. Both attemp t to transform information into a
software structure; both are driven by information. In data structure-oriented design information
structure are represented using hierarchical diagrams; DFD has little relevance; transformation
and transaction flows are not considered. Data structure-oriented design have a few tasks -
evaluate the characteristics of the data structure, represent the data in its lowest form such as
repetition, sequence or selection, map the data representation into a control hierarchy fo r
software, refine the control hierarchy and then develop a procedural description of the software.
4
Some examples of the data structure-oriented design approach are the Jackson System
Development (JSD) and the Data Structured Systems Development (DDSD) w hich is also called
the Warnier-Orr methodology.
With the introduction of very Large Scale Integrated circuits (VLSI), the computers became more
powerful and faster. As a result, various significant developments like networking and GUIs came
into being. Clearly, the complexity of software could not be dealt using control flow based design.
Thus, a new technique, namely, data-flow-oriented technique came into existence. In this
technique, the flow of data through business functions or processes is represented using Data-
flow Diagram (DFD). IEEE defines a data-flow diagram (also known as bubble chart and work-
flow diagram) as ‘a diagram that depicts data sources, data sinks, data storage, and processes
performed on data as nodes, and logical flow of data as links between the nodes.’
Object-oriented design technique has revolutionized the process of software development. It not
only includes the best features of structured programming but also some new and powerful
features such as encapsulation, abstraction, inheritance, and polymorphism. These new features
have tremendously helped in the development of well-designed and high-quality software. Object-
oriented techniques are widely used these days as they allow reusability of the code. They lead to
faster software development and high-quality programs. Moreover, they are easier to adapt and
scale, that is, large systems can be created by assembling reusable subsystems.
5
1.4 Explain the Software Life Cycle Models:
The software life cycle is a general model of the software development process including
all the activities. There are various software development life cycles are there like:
a) Classical Waterfall model
b) Iterative Waterfall model
c) Prototyping model
d) Evolutionary model
e) Spiral model etc..
In a practical software development project, the classical waterfall model is hard to use. So,
Iterative waterfall model can be thought of as incorporating the necessary changes to the
classical waterfall model to make it usable in practical software development projects. It is
almost same as the classical waterfall model except some changes are made to increase the
efficiency of the software development.
The iterative waterfall model provides feedback paths from every phase to its preceding
phases, which is the main difference from the classical waterfall model.
Feedback paths introduced by the iterative waterfall model are shown in the figure below.
8
When errors are detected at some later phase, these feedback paths allow correcting errors
committed by programmers during some phase. The feedback paths allow the phase to be
reworked in which errors are committed and these changes are reflected in the later phases.
But, there is no feedback path to the stage – feasibility study, because once a project has been
taken, does not give up the project easily.
It is good to detect errors in the same phase in which they are committed. It reduces the effort
and time required to correct the errors.
Phase Containment of Errors: The principle of detecting errors as close to their points of
commitment as possible is known as Phase containment of errors.
Advantages of Iterative Waterfall Model
Feedback Path: In the classical waterfall model, there are no feedback paths, so there
is no mechanism for error correction. But in iterative waterfall model feedback path from
one phase to its preceding phase allows correcting the errors that are committed and these
changes are reflected in the later phases.
Simple: Iterative waterfall model is very simple to understand and use. That’s why it is
one of the most widely used software development models.
Drawbacks of Iterative Waterfall Model
Difficult to incorporate change requests: The major drawback of the iterative
waterfall model is that all the requirements must be clearly stated before starting of the
development phase. Customer may change requirements after some time but the iterative
waterfall model does not leave any scope to incorporate change requests that are made after
development phase starts.
Incremental delivery not supported: In the iterative waterfall model, the full software
is completely developed and tested before delivery to the customer. There is no scope for
any intermediate delivery. So, customers have to wait long for getting the software.
Overlapping of phases not supported: Iterative waterfall model assumes that one
phase can start after completion of the previous phase, But in real projects, phases may
overlap to reduce the effort and time needed to complete the project.
Risk handling not supported: Projects may suffer from various types of risks. But,
Iterative waterfall model has no mechanism for risk handling.
Limited customer interactions: Customer interaction occurs at the start of the project
at the time of requirement gathering and at project completion at the time of software
9
delivery. These fewer interactions with the customers may lead to many problems as the
finally developed software may differ from the customers’ actual requirements.
The Prototyping Model is one of the most popularly used Software Development Life Cycle
Models (SDLC models).This model is used when the customers do not know the exact project
requirements beforehand. In this model, a prototype of the end product is first developed,
tested and refined as per customer feedback repeatedly till a final acceptable prototype is
achieved which forms the basis for developing the final product.
In this process model, the system is partially implemented before or during the analysis phase
thereby giving the customers an opportunity to see the product early in the life cycle. The
process starts by interviewing the customers and developing the incomplete high-level paper
model. This document is used to build the initial prototype supporting only the basic
functionality as desired by the customer. Once the customer figures out the problems, the
prototype is further refined to eliminate them. The process continues until the user approves
the prototype and finds the working model to be satisfactory.
10
1.4.5 The Spiral Model:
Spiral model is one of the most important Software Development Life Cycle models, which
provides support for Risk Handling. In its diagrammatic representation, it looks like a spiral
with many loops. The exact number of loops of the spiral is unknown and can vary from
project to project. Each loop of the spiral is called a Phase of the software development
process. The exact number of phases needed to develop the product can be varied by the
project manager depending upon the project risks. As the project manager dynamically
determines the number of phases, so the project manager has an important role to develop a
product using the spiral model.
The Radius of the spiral at any point represents the expenses(cost) of the project so far, and the
angular dimension represents the progress made so far in the current phase.
The below diagram shows the different phases of the Spiral Model: –
Each phase of the Spiral Model is divided into four quadrants as shown in the above figure.
The functions of these four quadrants are discussed below-
2. Identify and resolve Risks: During the second quadrant, all the possible solutions are
evaluated to select the best possible solution. Then the risks associated with that solution
are identified and the risks are resolved using the best possible strategy. At the end of this
11
quadrant, the Prototype is built for the best possible solution.
3. Develop next version of the Product: During the third quadrant, the identified features
are developed and verified through testing. At the end of the third quadrant, the next
version of the software is available.
4. Review and plan for the next Phase: In the fourth quadrant, the Customers evaluate
the so far developed version of the software. In the end, planning for the next phase is
started.
1. Risk Handling: The projects with many unknown risks that occur as the development
proceeds, in that case, Spiral Model is the best development model to follow due to the risk
analysis and risk handling at every phase.
2. Good for large projects: It is recommended to use the Spiral Model in large and
complex projects.
4. Customer Satisfaction: Customer can see the development of the product at the early
phase of the software development and thus, they habituated with the system by using it
before completion of the total product.
12
Disadvantages of Spiral Model:
Below are some main disadvantages of the spiral model.
1. Complex: The Spiral Model is much more complex than other SDLC models.
3. Too much dependability on Risk Analysis: The successful completion of the project
is very much dependent on Risk Analysis. Without very highly experienced experts, it is
going to be a failure to develop a project using this model.
Classical Waterfall Model: The Classical Waterfall model can be considered as the basic
model and all other life cycle models are based on this model. It is an ideal model. However,
the Classical Waterfall model cannot be used in practical project development, since this model
does not support any mechanism to correct the errors that are committed during any of the
phases but detected at a later phase. This problem is overcome by the Iterative Waterfall model
through the inclusion of feedback paths.
Iterative Waterfall Model: The Iterative Waterfall model is probably the most used software
development model. This model is simple to use and understand. But this model is suitable
only for well-understood problems and is not suitable for the development of very large
projects and projects that suffer from a large number of risks.
Prototyping Model: The Prototyping model is suitable for projects, which either the customer
requirements or the technical solutions are not well understood. This risks must be identified
before the project starts. This model is especially popular for the development of the user
interface part of the project.
Evolutionary Model: The Evolutionary model is suitable for large projects which can be
decomposed into a set of modules for incremental development and delivery. This model is
widely used in object-oriented development projects. This model is only used if incremental
delivery of the system is acceptable to the customer.
Spiral Model: The Spiral model is considered as a meta-model as it includes all other life
cycle models. Flexibility and risk handling are the main characteristics of this model. The
spiral model is suitable for the development of technically challenging and large software that
is prone to various risks that are difficult to anticipate at the start of the project. But this model
is more complex than the other models.
------ 0 --------
13