Software Engineering Study Material Software Engineering Study Material
Software Engineering Study Material Software Engineering Study Material
Software Engineering
Unit – I
1.0) Introduction
The Product is the computer software that software engineers design and build.
The roadmap that we follow to develop a product is called the process. To solve actual
problems, a software engineer must incorporate a development strategy that encompasses
the process, which is referred as process model. The various software process models are
1.1) Objective
The objective of this lesson makes the leaner to know about fundamental concepts
of software engineering. The content of the lesson starts with the product such as
evolution of software, characteristics of software. This lesson also aims the learner to get
the skill on process, process models such as waterfall and Boehm’s Spiral Model.
Towards end of this lesson student can sharpen their skills on software
engineering concepts from the stretch. It also makes them to read the fundamentals of
software engineering concepts.
1.2) Content
Page 1
Software Engineering
(2) Bespoke (customized) products these are systems, which are commissioned by a
particular customer. Some contractor develops the software especially for that
customer.
The challenge for software engineers is to produce high-quality software with a
finite amount of resources and to a predicted schedule.
The attributes of a software product are the characteristics displayed by the
product once it is installed and put into use. These are not the services provided by the
product. Rather, they are concerned with the product’s dynamic behaviour and the use
made of the product. Examples of these attributes are therefore efficiency, reliability,
maintainability, robustness, portability, and so on.
Optimizing all of these attributes is difficult as some are exclusive. For example,
providing a better user interface may reduce system efficiency. All are subject to the law
of these attributes is not a linear one. Small improvements in any of the attributes can be
expensive. A great deal of effort must be devoted to optimizing a particular attribute.
In the first era (1950 to mid 1960’s) of computer system evolution, the major
focus was given to hardware. Software was custom designed for each application and
has a relatively limited distribution. Most software was developed and used by the same
person or organizations.
Page 2
Software Engineering
In the second era (from mid 1960s to the late 1970s), multiprogramming and
multiuser systems were introduced for software applications. Real time systems were
used for process control. Database applications came into practice. Even in second era,
software developed in-house and the size of source code was unmanageable.
The third era (from mid 1970s till now) employs distributed and concurrent
processing in its applications. The need for software development has been increased
because of global and local area networks, high-bandwidth digital communications and
high-speed data access. Low-cost hardware increases the uses of computers now days.
1.2.1.1.1 Software
Page 3
Software Engineering
ii) Software doesn’t wear out. Hardware exhibits high failure rates early in its
life. When defects are corrected, failure rate drops to steady-state level. As time
passes, due to depreciation, dust, vibration, abuse, temperature extremes and
environmental factors, the hardware begins to ware out (Refer Figure 1.1).
Software is not susceptible to the environmental maladies. Therefore, the failure
rate will be low. Undiscovered defects will cause high failure rates early in the life of a
program. However these are corrected and curve flattens to steady state level (Refer
Figure 1.2).
iii) Most software is custom-built, rather than being assembled from existing
components.
Hardware engineer draws the circuit, does some analysis, takes the parts and ICs
and assembles. Where as software reusability is very minimal and the software
development needs to pass through many phases.
Page 4
Software Engineering
Page 5
Software Engineering
c) Business software
e) Embedded Software
g) Web-based software
The Web pages retrieved by a browser are software that incorporates executable
instructions (e.g., CGI, HTML, Perl, or Java), and data (e.g., hypertext and a variety of
visual and audio formats). In essence, the network becomes a massive computer
providing an almost unlimited software resource that can be accessed by anyone with a
modem.
Page 6
Software Engineering
1) Management myths
2) Customer myths
3) Practitioner myths
Myth: We already have a book that's full of standards and procedures for building
software; won't that provide my people with everything they need to know?
Reality: The book of standards may very well exist, but is it used? Are software
practitioners aware of its existence? Does it reflect modern software engineering prac-
tice? Is it complete? Is it streamlined to improve time to delivery while still maintaining a
focus on quality? In many cases, the answer to all of these questions is "no."
Myth: My people have state-of the-art software development tools; after all, we buy them
the newest computers.
Reality: It takes much more than the latest model mainframe, workstation, or PC to do
high-quality software development. Computer-Aided Software Engineering (CASE) tools
are more important than hardware for achieving good quality and productivity, yet the
majority of software developers still do not use them effectively.
Myth: If we get behind schedule, we can add more programmers and catch up
(sometimes called the Mongolian horde concept).
Myth: If I decide to outsource the software project to a third party, I can just relax and let
that firm build it.
Reality: If an organization does not understand how to manage and control software
projects internally it will invariably struggle when it outsources software projects.
Page 7
Software Engineering
Customer myths. A customer who requests computer software may be a person at the
next desk, a technical group down the hall, the marketing/sales department, or an outside
company that has requested software under contract. In many cases, the customer
believes myths about software because software managers and practitioners do little to
correct misinformation. Myths lead to false expectations (by the customer) and
ultimately, dissatisfaction with the developer.
Page 8
Software Engineering
Work products, and quality assurance points - enable the framework activities to
be adapted to the characteristics of the software project and the requirements of the
project team. Finally, umbrella activities-such as software quality assurance, software
configuration management, and measurement-overlay the process model. Umbrella
activities are independent of any one-framework activity and occur throughout the
process.
Software engineering practices and establishes five process maturity levels that
are defined in the following manner:
Level 1: Initial. The software process is characterized as ad hoc and occasionally even
chaotic. Few processes are defined, and success depends on individual effort.
Level 2: Repeatable. Basic project management processes are established to track cost,
schedule, and functionality. The necessary process discipline is in place to repeat earlier
successes on projects with similar applications
Level 3: Defined. The software process for both management and engineering activities
is documented, standardized, and integrated into an organization wide software process.
All projects use a documented and approved version of the organization’s process for
developing and supporting software. This level includes all characteristics defined for
level 2.
Page 9
Software Engineering
Level 4: Managed. Detailed measures of the software process and product quality are
collected. Both the software process and products are quantitatively understood and
controlled using detailed measures. This level includes all characteristics defined for
level 3.
Software process (like most business processes) is complex and involves a very
large number of activities. Like products, processes also have attributes or characteristics
such as those shown below.
Detailed software process models are still the subjects of research but it is now
clear that there are a number of different general models or paradigms of software
development:
(1) The waterfall approach: - This takes the above activities and represents them as
separate process phases such as requirements specification, software design,
implementation, testing and so on. After each stage is defined it is ‘signed-off’
and development goes on to the following stage.
(2) Evolutionary development: - This approach interleaves the activities of
specification, development and validation. An initial system is rapidly developed
from very abstract specifications. This is then refined with customer input to
produce a system, which satisfies the customer’s needs. The system may then be
delivered. Alternatively, it may be re-implemented using a more structured
approach to produce a more robust and maintainable system.
Page 10
Software Engineering
(4) System assembly from reusable components: - This technique assumes that parts
of the system already exist. The system development process focuses on
integrating these parts rather than developing them from scratch.
The first two of these approaches, namely the waterfall approach and evolutionary
development, are now widely used for practical system development. Some systems
have been built using correctness-preserving transformations but this is still an
experimental process.
Software engineering “methods” provide the technical “how to do’s for building
software”. Methods encompass an array of tasks such as project planning, estimation,
software requirement analysis, design of data structure, program architecture and
algorithm, procedure, coding, testing and maintenance.
Page 11
Software Engineering
Software engineering procedures hold the methods and tools together to enable
the software development in time. Procedures define the sequence in which methods will
be applied, the documents, reports etc to be delivered the controls that help ensure quality
and coordinate change, and methods to assess progress.
Software Development activity will have several stages wherein one identifies the
problem to be solved, develops a design, writes the code and so on. These activities,
along with a specified order in which they are performed are called a software
development process.
The simplest of such processes (process model as they are called) is the Waterfall
model. It is also called as classic life cycle model or the linear sequential model. The
waterfall model states that the various activities are performed one after the other, in a
linear fashion – akin to the water flowing down in a waterfall.
Typical phases in the waterfall model shown in Figure 1.4 are analysis and
specification, design, coding, testing, integration and maintanance.
(1) Requirements analysis and definition The system’s services, constraints and goals
are established by consultation with system users. Both users and development
staff then define them in a manner, which is understandable.
(2) System and software design The systems design process partitions the
requirements to either hardware or software systems. It establishes an overall
system architecture. Software design involves representing the software system
functions in a form that may be transformed into one or more executable
programs.
(3) Implementation and unit testing During this stage, the software design is realized
as a set of programs or program units. Unit testing involves verifying that each
unit meets its specification.
(4) Integration and system testing The individual program units or programs are
integrated and tested as a complete system to ensure that the software
requirements have been met. After testing, the software system is delivered to the
customer.
Page 12
Software Engineering
(5) Operation and maintenance Normally (although not necessarily) this is the
longest life cycle phase. The system is installed and put into practical 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.
These stages overlap and feed information to each other. During design, problems
with requirements are identified; during coding, design problems are found and so on.
The software process is not a simple linear model but involves a sequence of iterations of
the development activities.
During the final life cycle phase (operation and maintenance) the software is put
into use. Errors and omissions in the original software requirements are discovered.
Program and design errors emerge and the need for new functionality is identified.
Modifications become necessary for the software to remain useful. Making these
changes (software maintenance) may involve repeating some or all-previous process
stages.
1. It works only for systems designed to automate an existing manual system. For
absolutely new system determining the requirement is difficult, as the user
himself does not know them advance what is being built or finalised at each stage.
2. Freezing the requirements means freezing the hardware. A large project might
take few years to complete, by the time the product is available the hardware
become obsolete.
3. It assumes that requirements are frozen before the rest of development can
proceed. In some situations it might be desirable to first develop a part of the
system completely, and later enhance the system in phases. This is often done for
the software product that are developed not necessarily for a client, but for general
marketing in which case the requirements are likely to be determined largely by
developers themselves.
Page 13
Software Engineering
1.2.3.5 Prototyping
Suppose a customer has not identified the detailed input, processing or output
requirements, or developer may be unsure of the efficiency of an algorithm, operating
system etc, then prototyping approach would be the best approach.
Page 14
Software Engineering
Advantages
Problems
Even though problem can occur, since the customer and developer agree the
prototype for defining requirements, prototyping is an effective paradigm for software
engineering.
Business modeling. The information flow among business functions is modeled in a way
that answers the following questions: what information drives the business process?
What information is generated? Who generates it? Where does the information go? Who
processes it?
Data modeling. The information flow defined as part of the business-modeling phase is
refined into a set of data objects that are needed to support the business.
Page 15
Software Engineering
The characteristics (called attributes) of each object are identified and the
relationships between these objects defined.
Process modeling. The data objects defined in the data-modeling phase are transformed
to achieve the information flow necessary to implement a business function. Processing
descriptions are created for adding, modifying, deleting, or retrieving a data object.
Application generation. RAD assumes the use of fourth generation techniques . Rather
than creating software using conventional third generation programming languages the
RAD process works to reuse existing program components (when possible)
or create reusable components (when necessary). In all cases, automated tools are used to
facilitate construction of the software.
Testing and turnover. Since the RAD process emphasizes re-use, many of the program
components have already been tested. This reduces overall testing time. However, new
components must be tested and all interfaces must be fully exercised.
For large but scalable projects, RAD requires sufficient human resources to create the
right number of RAD teams.
Page 16
Software Engineering
RAD requires developers and customers who are committed to the rapid-fire
activities necessary to get a system complete in a much-abbreviated time frame. If
commitment is lacking from either constituency, RAD projects will fail.
Not all types of applications are appropriate for RAD. If a system cannot be properly
modularized, building the components necessary for RAD will be problematic. If
high performance is an issue and performance is to be achieved through tuning the
interfaces to system components, the RAD approach may not work.
RAD is not appropriate when technical risks are high. This occurs when a new
application makes heavy use of new technology or when the new software requires a
high degree of interoperability with existing computer programs.
1.2.4 Evolutionary Software Process Models
i. The Spiral Model
Barry Boehm's spiral model of the lifecycle shows the development of software
over a number of iterations. Two things of significance in this model are
The Spiral model includes the features of both the classic life cycle and
prototyping. Also it adds a new element-risk analysis. The model, represented in the
given Fig1.7, defines four major activities.
1. Planning - to determine objectives, alternatives and
Constraints
2. Risk Analysis - to analyze alternatives and to identify risks
3. Engineering - to develop the product
4. Customer evaluation - to assess the product
With each iteration around the spiral, more complete versions of the software are
built. During the first circuit, objectives, alternatives, and constraints are defined and
risks are identified and analyzed. If risk analysis indicates the uncertainty in
requirements, prototyping may be used in the engineering quadrant to assist the customer
and developer.
The customer evaluates the engineering work and makes suggestions for
modification. Based on the customer input, the next phase of planning and risk analysis
occur. At each loop around the spiral, whether to proceed or not is decided. If risks are
too great the project is terminated.
Page 17
Software Engineering
Page 18
Software Engineering
Page 19
Software Engineering
Page 20
Software Engineering
Page 21
Software Engineering
Page 22
Software Engineering
Page 23
Software Engineering
About every ten years, give or take five, the software community redefines "the
problem" by shifting its focus from product issues to process issues. Thus, we have
embraced structured programming languages (product) followed by structured analysis
methods (process) followed by data encapsulation (product) followed by the current
emphasis on the Software Engineering Institute's Software Development Capability
Maturity Model (process).
While the natural tendency of a pendulum is to come to rest at a point midway
between two extremes, the software community's focus constantly shifts because new
force is applied when the last swing fails. These swings are harmful in and of themselves
because they confuse the average software practitioner by radically changing what it
means to perform the job let alone perform it well. The swings also do not solve "the
problem" for they are doomed to fail as long as product and process are treated as
forming a dichotomy instead of a duality.
Page 24
Software Engineering
Spiral model
The Spiral model includes the features of both the classic life cycle and prototyping. Also
it adds a new element-risk analysis. The model, defines four major activities. Planning,
Risk Analysis, Engineering and Customer evaluation
Page 25
Software Engineering
There is a dedicated team for each stage so that the work can be done in pipelining. Thus,
stages should be chosen in such a way that each stage perform some logical unit of work
that becomes the input for next stage.
In addition to the advantages of iterative model, time boxing model has some other
advantages too. Various advantages and disadvantages associated with timeboxing model
are listed in Table.
Advantages Disadvantages
1. Speeds up the development process 1. Project management becomes more
and shortens the delivery time complex.
2. Well suited to develop projects with 2. Not suited to projects in which entire
a number of features in short time development work cannot be divided
period. into multiple iterations of almost,
equal duration.
Page 26
Software Engineering
Formal methods comprise formal specification using mathematics to specify the desired
properties of the system. Formal specification is expressed in a language whose syntax
and semantics are formally defined. This language comprises a syntax that defines
specific notation used for specification representation; semantic, which uses objects to
describe the system; and a set of relations, which uses rules to indicate the objects for
satisfying the specification.
Generally, the formal method comprises two approaches, namely, property based and
model-based. The property-based specification describes the operations performed on
the system. In addition, it describes the relationship that exists among these operations. A
property-based specification consists of two parts: signatures, which determine the syntax
of operations and an equation, which defines the semantics of the operations through a set
of equations known as axioms. The model-based specification utilizes the tools of set
theory, function theory, and logic to develop an abstract model of the system. In addition,
it specifies the operations performed on the abstract model. The model thus developed is
of a high level and idealized. A model-based specification comprises a definition of the
set of states of the system and definitions of the legal operations performed on the system
to indicate how these legal operations change the current state.
Various advantages and disadvantages associated with a formal method model are listed
in Table.
Advantages Disadvantages
1. Discovers ambiguity, 1. Time consuming and expensive.
incompleteness, and inconsistency 2. Difficult to use this model as a
in the software. communication mechanism for non
2. Offers defect-free software. technical personnel.
3. Incrementally grows in effective
solution after each iteration. 3. Extensive training is required since
4. This model does not involve high only few developers have the essential
complexity rate. knowledge to implement this model.
Page 27
Software Engineering
Similarities:
Differences:
Component-oriented software design has many advantages over the traditional object-
oriented approaches such as −
What is a Component?
Page 28
Software Engineering
Views of a Component
A component can have three different views − object-oriented view, conventional view,
and process-related view.
Object-oriented view
Conventional view
Process-related view
In this view, instead of creating each component from scratch, the system is building
from existing components maintained in a library. As the software architecture is
formulated, components are selected from the library and used to populate the
architecture.
A user interface (UI) component includes grids, buttons referred as controls, and
utility components expose a specific subset of functions used in other
components.
Other common types of components are those that are resource intensive, not
frequently accessed, and must be activated using the just-in-time (JIT) approach.
Page 29
Software Engineering
Characteristics of Components
Page 30
Software Engineering
A component can extend to other components and still offer its own extension
points. It is the concept of plug-in based architecture. This allows a plugin to offer
another plugin API.
Creates a naming conventions for components that are specified as part of the
architectural model and then refines or elaborates as part of the component-level model.
Attains architectural component names from the problem domain and ensures that
they have meaning to all stakeholders who view the architectural model.
Extracts the business process entities that can exist independently without any
associated dependency on other entities.
Models any dependencies from left to right and inheritance from top (base class)
to bottom (derived classes).
Recognizes all design classes that correspond to the problem domain as defined in the
analysis model and architectural model.
Page 31
Software Engineering
Describes all design classes that are not acquired as reusable components, and
specifies message details.
Identifies appropriate interfaces for each component and elaborates attributes and
defines data types and data structures required to implement them.
Describes persistent data sources (databases and files) and identifies the classes
required to manage them.
The final decision can be made by using established design principles and
guidelines. Experienced designers consider all (or most) of the alternative design
solutions before settling on the final design model.
Advantages
Reusable − The use of reusable components means that they can be used to
spread the development and maintenance cost across several applications or
systems.
Page 32
Software Engineering
Reliability − The overall system reliability increases since the reliability of each
individual component enhances the reliability of the whole system via reuse.
It is better for software products that have their feature sets redefined during development
because of user feedback and other factors. The Evolutionary development model divides
the development cycle into smaller, incremental waterfall models in which users are able
to get access to the product at the end of each cycle.
Feedback is provided by the users on the product for the planning stage of the next cycle
and the development team responds, often by changing the product, plan or process.
Therefore, the software product evolves with time.
All the models have the disadvantage that the duration of time from start of the project to
the delivery time of a solution is very high. Evolutionary model solves this problem in a
different approach.
Page 33
Software Engineering
Evolutionary model suggests breaking down of work into smaller chunks, prioritizing
them and then delivering those chunks to the customer one by one. The number of chunks
is huge and is the number of deliveries made to the customer. The main advantage is that
the customer’s confidence increases as he constantly gets quantifiable goods or services
from the beginning of the project to verify and validate his requirements. The model
allows for changing requirements as well as all work in broken down into maintainable
work chunks.
1. It is used in large projects where you can easily find modules for incremental
implementation. Evolutionary model is commonly used when the customer wants
to start using the core features instead of waiting for the full software.
2. Evolutionary model is also used in object oriented software development because
the system can be easily portioned into units in terms of objects.
Advantages:
Page 34
Software Engineering
Disadvantages:
Sometimes it is hard to divide the problem into several versions that would be
acceptable to the customer which can be incrementally implemented and
delivered.
In the first step of iterative enhancement model, a simple initial implementation is done
for a subset of the overall problem. This subset is the one that contains some of the key
aspects of the problem which are easy to understand and implement, and which forms a
useful and usable system. A project control list is created which contains, in an order, all
the tasks that must be performed to obtain the final implementation. This project control
list gives an idea of how far the project is at any given step from the final system.
Each step consists of removing the next step from the list. Designing the implementation
for the selected task, coding and testing the implementation, and performing an analysis
of the partial system obtained after this step and updating the list as a result of the
analysis. These three phases are called the design phase, implementation phase and
analysis phase. The process is iterated until the project control list is empty, at the time
the final implementation of the system will be available. The process involved in iterative
enhancement model is shown in the figure below.
The project control list guides the iteration steps and keeps track of all tasks that must be
done. The tasks in the list can be include redesign of defective components found during
analysis. Each entry in that list is a task that should be performed in one step of the
iterative enhancement process, and should be simple enough to be completely
understood. Selecting tasks in this manner will minimize the chances of errors and reduce
the redesign work.
Page 35
Software Engineering
An iterative life cycle model does not start with a full specification of requirements. In
this model, the development begins by specifying and implementing just part of the
software, which is then reviewed in order to identify further requirements. Moreover, in
iterative model, the iterative process starts with a simple implementation of a small set of
the software requirements, which iteratively enhances the evolving versions until the
complete system is implemented and ready to be deployed. Each release of Iterative
Model is developed in a specific and fixed time period, which is called iteration.
Furthermore, this iteration focuses on a certain set of requirements. Each cycle ends with
a usable system i.e., a particular iteration results in an executable release. Iterative Model
allows accessing previous phases, in which the changes are made accordingly. The final
output of the product is revived at the end of the Software Development Life Cycle
(SDLC). Typically iterative development is used in conjunction with incremental
development, in which a longer software development cycle is split into smaller segments
that are built upon each other. Hence, iterative model is used in following scenarios:
When the requirements of the complete system are clearly defined and
understood.
The major requirements are defined, while some functionalities and requested
enhancements evolve with the process of the development process.
A new technology is being used and is being learnt by the development team,
while they are working on the project.
If there are some high risk features and goals, which might change in the future.
When the resources with needed skill sets are not available and are planned to be
used on contract basis for specific iterations.
The process of Iterative Model is cyclic, unlike the more traditional models that focus on
a rigorous step-by-step process of development. In this process, once the initial planning
is complete, a handful of phases are repeated again and again, with the completion of
each cycle incrementally improving and iterating on the software. Other phases of the
iterative model are described below:
Page 36
Software Engineering
1. Planning Phase: This is the first stage of the iterative model, where proper
planning is done by the team, which helps them in mapping out the specifications
documents, establish software or hardware requirements and generally prepare for
the upcoming stages of the cycle.
2. Analysis and Design Phase: Once the planning is complete for the cycle, an
analysis is performed to point out the appropriate business logic, database models
and to know any other requirements of this particular stage. Moreover, the design
stage also occurs in this phase of iterative model, where the technical
requirements are established that will be utilized in order to meet the need of
analysis stage.
3. Implementation Phase: This is the third and the most important phase of the
iterative model. Here, the actual implementation and coding process is executed.
All planning, specification, and design documents up to this point are coded and
implemented into this initial iteration of the project.
4. Testing Phase: After the current build iteration is coded and implemented, testing
is initiated in the cycle to identify and locate any potential bugs or issues that may
have been in the software.
5. Evaluation Phase: The final phase of the Iterative life cycle is the evaluation
phase, where the entire team along with the client, examine the status of the
project and validate whether it is as per the suggested requirements.
Page 37
Software Engineering
Even though, iterative model is extremely beneficial, there are few drawbacks and
disadvantages attached to it, such as, each phase of an iteration is rigid with no overlaps.
Also, system architecture or design issues may arise because not all requirements are
gathered in the beginning of the entire life cycle. Other disadvantages of iterative model
are:
Page 38