Software Engineering (2)
Software Engineering (2)
Software Engineering (2)
KALIKI PHANI
SOFTWARE ENGINEERING
Unit – I: Basic concepts in software engineering and software project management
Basic concepts: abstraction versus decomposition, evolution of software engineering techniques, Software
development life cycle (SDLC) models: Iterative waterfall model, Prototype model, Evolutionary model, Spiral model,
RAD model, Agile models, software project management: project planning, project estimation, COCOMO, Halstead’s
Software Science, project scheduling, staffing, Organization and team structure, risk management, configuration
management.
Important questions(unit:1):
• For the development of water level management system for skyscrapers. Suggest the suitable engineering
process model. discuss this model with its phases and processes.
• For the development of online web-based hotel booking software, which software models will be more
suitable? Discuss the suggested model with related phases associated with it.
• Explain how COCOMO model work for cost estimation and project estimation.
• With a neat diagram explain the following SDLC models with their advantages and disadvantages:
• Iterative waterfall model
• Prototype model
• Evolutionary model
• V model
• RAD model
• Spiral model
• Briefly discuss the agile process.
• Explain briefly about COCOMO – a heuristic estimation technique.
• Explain the various characteristics of software.
• Explain risk management and its principles.
• Infer Workout project cost estimates using COCOMO and schedules using PERT and GANTT charts.
• discuss about prototype model and state advantages of it.
• what are the umbrella activities of a software processes?
• which processes model lead to software reuse? Justify.
• illustrate the functioning of unified process.
• explain briefly about generic process model.
• discuss the process framework activities.
• explain unified process and elaborate on the unified process work products.
• explain personal and team process models.
Software engineering discusses systematic and cost-effective techniques for software development. These
techniques help develop software using an engineering approach. We mainly use these two fundamental principles
in various forms and flavours in the different software development activities. A thorough understanding of these
two principles is therefore needed.
Abstraction:
Def: Abstraction is the simplification of a problem by focusing on only one aspect of the problem while omitting all
other aspects.
Abstraction refers to construction of a simpler version of a problem by ignoring the details. The principle of
constructing an abstraction is popularly known as modelling (or model construction).
When using the principle of abstraction to understand a complex problem, we focus our attention on only one or
two specific aspects of the problem and ignore the rest. Whenever we omit some details of a problem to construct
an abstraction, we construct a model of the problem.
A single level of abstraction can be sufficient for rather simple problems. However, more complex problems
would need to be modelled as a hierarchy of abstractions. The most abstract representation would have only a few
items and would be the easiest to understand. After one understands the simplest representation, one would try to
understand the next level of abstraction where at most five or seven new information are added and so on until the
lowest level is understood. By the time, one reaches the lowest level, he would have mastered the entire problem.
Decomposition:
Def: The decomposition principle advocates decomposing the problem into many small independent parts. The
small parts are then taken up one by one and solved separately. The idea is that each small part would be easy to
grasp and understand and can be easily solved. The full problem is solved when all the parts are solved.
Decomposition is another important principle that is available to handle problem complexity. The
decomposition principle is popularly known as the divide and conquer principle. A popular way to demonstrate the
decomposition principle is by trying to break a large bunch of sticks tied together and then breaking them
individually. The different parts after decomposition should be more or less independent of each other. That is, to
solve one part you should not have to refer and understand other parts. If to solve one part you would have to
understand other parts, then this would boil down to understanding all the parts together. This would effectively
reduce the problem to the original problem before decomposition (the case when all the sticks tied together).
Evolution of technology development has followed strikingly similar patterns, that every technology in the initial
technologies start as a form of art. Overtime it graduates to a craft and finally, emerges as an engineering discipline.
We can consider the exploratory programming development style as an art and the programmers in the past who
were like proficient artists (good programmers) knew certain principles that helped them to write good programs by
some esoteric knowledge. The bad programmers were left to wonder how could some programmers effortlessly
write elegant and correct programs each time.
The exploratory style usually leads poor quality and unmaintainable code and also makes program
development very expensive as well as time consuming.
An exploratory development style can be successful when used for developing very small programs and not
for professional software. In an exploratory development scenario, as the program size increases the required time
and effort increases almost exponentially. For large problems, it would take too long and cost too much to be
practically meaningful to develop program using exploratory programming style.
Control flow-based design:
In early 1960s, computers became faster by replacing vacuum tubes with semiconductor transistor-based
circuits in a computer. With the availability of more powerful computers, it became possible to solve larger and
more complex problems. At this time, high level languages such as FORTRAN, ALGOL and COBOL were introduced.
As the size and complexity of programs kept increasing, the computer programming style proved to be
insufficient. Programmers found it increasingly difficult not only to write cost-effective and correct programs, but
also to understand and maintain programs written by others. So, the programmers paid attention to understand the
control flow structure. A program’s control flow structure indicates the sequence in which the program’s
instructions are executed.
Are GO TO statements the culprits?
In a landmark paper, Dijkstra [1968] published his (now famous) article “GO TO Statements Considered
Harmful”. He pointed out that unbridled use of GO TO statements is the main culprit in making the control
structure of a program messy. GO TO statements alter the flow of control arbitrarily, resulting in too many paths.
But, then why does use of too many GO TO statements makes a program hard to understand?
• Requirements gathering and analysis: The goal of the requirements gathering activity is to collect all
relevant information regarding the software to be developed from the customer with a view to clearly
understand the requirements. The goal of the requirements analysis activity is to weed out the
incompleteness and inconsistencies in these gathered requirements
• Requirement’s specification: This is called a software requirements specification (SRS) document. The SRS
document is written using end-user terminology to increase customer understandability. The SRS
document normally serves as a contract between the development team and the customer.
Design:
After the analysis stage, it’s time to create design or a blueprint for the software. Architects and senior
developers create a high-level design of the software architecture along with a low-level design describing how each
and every component in software should work.
Construction:
This is also called coding, testing and installation stage. The coding phase is also sometimes called the
implementation phase, since the design is implemented into a workable solution in this phase. Each component of
the design is implemented as a program module. The end-product of this phase is a set of program modules that
have been individually unit tested.
Unit testing is carried out to determine the correct working of the individual modules. The specific activities
carried out during unit testing include designing test cases, testing, debugging to fix problems, and
management of test cases. We shall discuss the coding and unit testing techniques
Integration testing is carried out to verify that the interfaces among different units are working
satisfactorily. On the other hand, the goal of system testing is to ensure that the developed system
conforms to the requirements that have been laid out in the SRS document.
Maintenance:
The total effort spent on maintenance of a typical software during its operation phase is much more than
that required for developing the software itself. Many studies carried out in the past confirm this and indicate that
the ratio of relative effort of developing a typical software product and the total effort spent on its maintenance is
roughly 40:60. Maintenance is required in the following three types of situations
• Corrective maintenance: This type of maintenance is carried out to correct errors that were not discovered
during the product development phase.
• Perfective maintenance: This type of maintenance is carried out to improve the performance of the
system, or to enhance the functionalities of the system based on customer’s requests.
• Adaptive maintenance: Adaptive maintenance is usually required for 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.
.
Most modern development processes can be vaguely described as agile. Other methodologies include
waterfall prototyping, iterative and incremental development, spiral development, rapid application development
and extreme programming.
Waterfall Model:
Waterfall model is the simplest model of software development paradigm. All the phases of SDLC will function one
after another in linear manner. That is, when the first phase is finished then only the second phase will start and so
on.
This model assumes that everything is carried out and taken place perfectly as planned in the previous stage and
there is no need to think about the past issues that may arise in the next phase. This model does not work smoothly
if there are some issues left at the previous step. The sequential nature of model does not allow us to go back and
undo or redo our actions.
This model is best suited when developers already have designed and developed similar software in the past and are
aware of all its domains.
The iterative waterfall model provides feedback paths from every phase to its preceding phases, which is
the main difference from the classical waterfall model.
Prototype model:
The prototyping model can be considered to be an extension of the waterfall model. This model suggests
building a working prototype of the system, before development of the actual software.
Necessity of the prototyping model:
The prototyping model is advantageous to use for specific types of projects. In the following, we identify
three types of projects for which the prototyping model can be followed to advantage:
• The GUI part of a software system is almost always developed using the prototyping model.
• The prototyping model is especially useful when the exact technical solutions are unclear to the
development team and helps to critically examine the technical issues of product development.
• An important reason for developing a prototype is that it is impossible to “get it right” the first time.
Life cycle activity of protype model:
The prototyping model of software development is developed through two major activities
• prototype construction
• Iterative waterfall-based software development.
Prototype development:
Prototype development starts with an initial requirements gathering phase. A quick design is carried out and
a prototype is built. The developed prototype is submitted to the customer for evaluation. Based on the customer
feedback, the requirements are refined and the prototype is suitably modified. This cycle of obtaining customer
feedback and modifying the prototype continues till the customer approves the prototype.
Iterative development:
Once the customer approves the prototype, the actual software is developed using the iterative waterfall
approach. In spite of the availability of a working prototype, the SRS document is usually needed to be developed.
The code for the prototype is usually thrown away. However, the experience gathered from developing the
prototype helps a great deal in developing the actual system.
Advantages of the prototyping model:
Using a prototype model can bring multiple advantages, including:
• Customers get a say in the product early on, increasing customer satisfaction.
• Missing functionality and errors are detected easily.
• Prototypes can be reused in future, more complicated projects.
• It emphasizes team communication and flexible design practices.
• Users have a better understanding of how the product works.
• Quicker customer feedback provides a better idea of customer needs.
Disadvantages of the prototyping model:
• The main disadvantage of this methodology is that it is more costly in terms of time and money when
compared to alternative development methods, such as the spiral or Waterfall model.
• The prototype is constructed only at the start of the project, the prototyping model is ineffective for risks
identified later during the development cycle.
There are four types of prototype model available:
Rapid Throwaway Prototyping :
This technique offers a useful method of exploring ideas and getting customer feedback for each of them.
In this method, a developed prototype need not necessarily be a part of the ultimately accepted prototype.
Customer feedback helps in preventing unnecessary design faults and hence, the final prototype developed is of
better quality.
Evolutionary Prototyping :
In this method, the prototype developed initially is incrementally refined on the basis of customer
feedback till it finally gets accepted. In comparison to Rapid Throwaway Prototyping, it offers a better approach
which saves time as well as effort. This is because developing a prototype from scratch for every iteration of the
process can sometimes be very frustrating for the developers.
Incremental Prototyping:
In this type of incremental Prototyping, the final expected product is broken into different small pieces of
prototypes and being developed individually. In the end, when all individual pieces are properly developed, then
the different prototypes are collectively merged into a single final product in their predefined order. It’s a very
efficient approach which reduces the complexity of the development process, where the goal is divided into sub-
parts and each sub-part is developed individually. The time interval between the project begin and final delivery is
substantially reduced because all parts of the system are prototyped and tested simultaneously. Of course, there
might be the possibility that the pieces just not fit together due to some lack ness in the development phase – this
can only be fixed by careful and complete plotting of the entire system before prototyping starts.
Extreme Prototyping:
This method is mainly used for web development. It is consisting of three sequential independent phases:
• In this phase a basic prototype with all the existing static pages are presented in the HTML format.
• In the 2nd phase, Functional screens are made with a simulate data process using a prototype services layer.
• This is the final step where all the services are implemented and associated with the final prototype.
Evolutionary model:
Evolutionary model is a combination of Iterative and Incremental model of software development life
cycle. The prototype developed initially is incrementally refined on the basis of customer feedback till it finally
gets accepted.
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.
Evolutionary model suggests breaking down the development cycle into smaller, incremental waterfall
models as users are able to get access to the product at the end of each cycle. 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.
A schematic representation of the evolutionary model of development has been shown below.
Disadvantages:
• Feature division into incremental parts can be non-trivial: 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.
Spiral model:
This model gets its name from the appearance of its diagrammatic representation that looks like a spiral
with many loops. The exact number of loops of the spiral is not fixed and can vary from project to project. Each loop
of the spiral is called a phase of the software process. The exact number of phases through which the product is
developed can be varied by the project manager depending upon the project risks. A prominent feature of the spiral
model is handling unforeseen risks that can show up much after the project has started.
In contrast to prototype model, in the spiral model prototypes are built at the start of every phase. Each
phase of the model is represented as a loop in its diagrammatic representation. Over each loop, one or more
features of the product are elaborated and analyzed and the risks at that point of time are identified and are
resolved through prototyping.
RAD model:
The Rapid Application Development Model was first proposed by IBM in 1980’s. The critical feature of this
model is the use of powerful development tools and techniques.
RAD model suggests that broken down of project into small modules whereas each module can be
assigned independently to separate teams. These modules can finally be combined to form the final product.
Development of each module involves the various basic steps as analysing, designing, coding and then testing,
etc. Another striking feature of this model is a short time span i.e., the time frame for delivery(time-box) is
generally 60-90 days.
Main motivation:
In iterative waterfall model, the customers do not get to see the software, until the development is
complete in all respects and the software has been delivered and installed. Naturally, the delivered software often
does not meet the customer expectations. The changes are incorporated through subsequent maintenance efforts.
It takes a long time to have a good product that meet the requirements of the customers. The RAD model tries to
overcome this problem by inviting and incorporating customer feedback on successively developed and refined
prototypes.
Working of RAD:
In the RAD model, development takes place in a series of short cycles or iterations. Development team
focuses on present iteration and plans are made for that iteration only. The time planned for each iteration is called
a time box. During each time box, a quick-and-dirty prototype for some functionality is developed. The prototype is
refined based on the customer feedback. The development team usually consists of about five to six members,
including a customer representative. Customer representative covers the communication gap between the
customer and the development team.
Advantages –
• Use of reusable components helps to reduce the cycle time of the project.
• Feedback from the customer is available at initial stages.
• Reduced costs as fewer developers are required.
• Use of powerful development tools results in better quality products in comparatively shorter time
spans.
• The progress and development of the project can be measured through the various stages.
• It is easier to accommodate changing requirements due to the short iteration time spans.
Disadvantages –
• The use of powerful and efficient tools requires highly skilled professionals.
• The absence of reusable components can lead to failure of the project.
• The team leader must work closely with the developers and customers to close the project in time.
• The systems which cannot be modularized suitably cannot use this model.
• Customer involvement is required throughout the life cycle.
• It is not meant for small scale projects as for such cases, the cost of using automated tools and
techniques may exceed the entire budget of the project.
Applications –
1. This model should be used for a system with known requirements and requiring short development
time.
2. It is also suitable for projects where requirements can be modularized and reusable components are
also available for development.
3. The model can also be used when already existing system components can be used in developing a
new system with minimum changes.
4. This model can only be used if the teams consist of domain experts. This is because relevant
knowledge and ability to use powerful techniques is a necessity.
5. The model should be chosen when the budget permits the use of automated tools and techniques
required.
Comparison of RAD with Other Models:
we compare the relative advantages and disadvantages of RAD with other life cycle models.
RAD versus prototyping model:
In the prototyping model, the developed prototype is primarily used by the development team to gain
insights into the problem, choose between alternatives, and elicit customer feedback. The code developed during
prototype construction is usually thrown away. In contrast, in RAD it is the developed prototype that evolves into
the deliverable software.
Though RAD is expected to lead to faster software development compared to the traditional models (such as the
prototyping model), though the quality and reliability would be inferior.
RAD versus iterative waterfall model:
In the iterative waterfall model, all the functionalities of a software are developed together. On the other
hand, in the RAD model the product functionalities are developed incrementally through heavy code and design
reuse. Further, in the RAD model customer feedback is obtained on the developed prototype after each iteration
and based on this the prototype is refined. Thus, it becomes easy to accommodate any request for requirements
changes. However, the iterative waterfall model does not support any mechanism to accommodate any
requirement change requests. The iterative waterfall model does have some important advantages that include the
following. Use of the iterative waterfall model leads to production of good quality documentation which can help
during software maintenance. Also, the developed software usually has better quality and reliability than that
developed using RAD.
RAD versus evolutionary model:
Incremental development is the hallmark of both evolutionary and RAD models. However, in RAD each
increment results in essentially a quick and dirty prototype, whereas in the evolutionary model each increment is
systematically developed using the iterative waterfall model. Also in the RAD model, software is developed in much
shorter increments compared the evolutionary model. In other words, the incremental functionalities that are
developed are of fairly larger granularity in the evolutionary model.
How does RAD facilitate accommodation of change requests?
The customers usually suggest changes to a specific feature only after they have used it. Since the features
are delivered in small increments, the customers are able to give their change requests to a feature already
delivered. Incorporation of such change requests just after the delivery of an incremental feature saves cost as this
is carried out before large investments have been made in development and testing of a large number of features.
Agile models:
Agile Methodology is a practice that promotes continuous iteration of development and testing throughout
the software development lifecycle of the project. In the Agile model in software testing, both development and
testing activities are concurrent. The agile software development model was proposed in the mid-1990s to
overcome the limitations of the waterfall model.
In the agile model, the requirements are decomposed into many small parts that can be incrementally
developed over an iteration. Each iteration is intended to be small and easily manageable and lasting for a couple of
weeks only. At a time, only one increment is planned, developed, and then deployed at the customer site. No long-
term plans are made. The time to complete an iteration is called a time box. The implication of the term time box is
that the end date for an iteration does not change. That is, the delivery date is considered sacrosanct. The
development team can, however, decide to reduce the delivered functionality during a time box if necessary.
Essential Idea behind Agile Models:
• For establishing close contact with the customer during development and to gain a clear understanding.
• Team size be deliberately kept small (5–9 people) to help the team members meaningfully engage in face-to-
face communication and have collaborative work environment.
The following important principles behind the agile model were publicized in the agile manifesto in 2001:
• Working software over comprehensive documentation.
• Frequent delivery of incremental versions of the software to the customer in intervals of few weeks.
• Requirement change requests from the customer are encouraged and are efficiently incorporated.
• Having competent team members and enhancing interactions among them, through face-to-face
communication rather than through exchange of formal documents.
• Continuous interaction with the customer is considered much more important rather than effective contract
negotiation. A customer representative is required to be a part of the development team, thus facilitating close,
daily co-operation between customers and developers.
• Agile development projects usually deploy pair programming.
In pair programming, two programmers work together at one work station. One types in code while the other
reviews the code as it is typed in. The two programmers switch their roles every hour or so. Several studies indicate
that programmers working in pairs produce compact well-written programs and commit fewer errors as compared
to programmers working alone.
Agile versus Other Models:
we compare the characteristics of the agile model with other models of development.
• Agile methodologies propose incremental and iterative approach whereas in waterfall model development
flows sequentially from start to end.
• Agile process is broken down into smaller individual models that designers work on whereas waterfall model
process is not broken into individual models.
• With agile model, even in midway of a project leaves the customer with some worthwhile code, that might
possibly have already been put into live operation. Whereas in midway of project of waterfall models there is
nothing to show beyond several documents.
• Agile development model’s frequent re- evaluation of plans, emphasis on face-to-face communication, and
relatively sparse use of documentation are similar to that of the exploratory style. Agile teams, however, do
follow defined and disciplined processes and carry out systematic requirements capture, rigorous designs,
compared to chaotic coding in exploratory programming.
• The central theme of RAD is based on designing quick and dirty prototypes, which are then refined into
production quality code. Whereas Agile projects logically break down the solution into features that are
incrementally developed and delivered. Developers using the RAD model focus on developing all the features of
an application by first doing it badly and then successively improving the code over time.
The most popular Agile methods include Rational Unified Process (1994), Scrum (1995), Crystal Clear,
Extreme Programming (1996), Adaptive Software Development, Feature Driven Development, and Dynamic Systems
Development Method (DSDM) (1995). These are now collectively referred to as Agile Methodologies. Agile model
is being used as an umbrella term to refer to a group of development processes.
Scrum:
SCRUM is an agile development process focused primarily on ways to manage tasks in team-based development
conditions.
There are three roles in it, and their responsibilities are:
Scrum Master: The scrum can set up the master team, arrange the meeting and remove obstacles for the process
Product owner: The product owner makes the product backlog, prioritizes the delay and is responsible for the
distribution of functionality on each repetition.
Scrum Team: The team manages its work and organizes the work to complete the sprint or cycle.
Extreme Programming(XP):
The extreme programming model recommends taking the best practices that have worked well in the past in
program development projects to extreme levels.
Good practices needs to practiced extreme programming: Some of the good practices that have been recognized
in the extreme programming model and suggested to maximize their use are given below:
• Code Review: Code review detects and corrects errors efficiently. It suggests pair programming as
coding and reviewing of written code carried out by a pair of programmers who switch their works
between them every hour.
• Testing: Testing code helps to remove errors and improves its reliability. XP suggests test-driven
development (TDD) to continually write and execute test cases. In the TDD approach test cases are
written even before any code is written.
• Incremental development: Incremental development is very good because customer feedback is
gained and based on this development team come up with new increments every few days after each
iteration.
• Simplicity: Simplicity makes it easier to develop good quality code as well as to test and debug it.
• Design: Good quality design is important to develop a good quality software. So, everybody should
design daily.
• Integration testing: It helps to identify bugs at the interfaces of different functionalities. Extreme
programming suggests that the developers should achieve continuous integration by building and
performing integration testing several times a day.
Crystal:
There are three concepts of this method-
• Chartering: Multi activities are involved in this phase such as making a development team, performing feasibility
analysis, developing plans, etc.
• Cyclic delivery: under this, two more cycles consist, these are:
• Team updates the release plan.
• Integrated product delivers to the users.
• Wrap up: According to the user environment, this phase performs deployment, post-deployment.
During project planning, the project manager performs the following activities:
1. Estimation: The following project attributes are estimated.
• Cost: How much is it going to cost to develop the software product?
• Duration: How long is it going to take to develop the product?
• Effort: How much effort would be necessary to develop the product?
2. Scheduling: After all the necessary project parameters have been estimated, the schedules for manpower and
other resources are developed.
3. Staffing: Staff organisation and staffing plans are made.
Scheduling and staffing are dependent on the accuracy.
4. Risk management : This includes risk identification, analysis, and abatement planning.
Miscellaneous plans: This includes making several other plans such as quality assurance plan, and configuration
management plan, etc.
Fig: Precedence ordering among planning activities
Input(I) 3 4 6
Output (O) 4 5 7
Inquiry (E) 3 4 6
Number of files (F) 7 10 15
Number of interfaces 5 7 10
Estimator: It complete their individual estimate anomalously and submit to the coordinator with
mentioning, if any, unusual characteristics of product which has influenced his estimation.
The coordinator and distribute the summary of the response to all estimator and they re-estimate them.
This process is Iterated for several rounds. No discussion is allowed among the estimator during the
entire estimation process because there may be many estimators get easily influenced by rationale of an
estimator who may be more experienced or senior. After the completion of several iterations of
estimation, the coordinator takes the responsibility of compiling the result and preparing the final
estimates.
Heuristic Techniques:
Heuristic techniques assume that the relationships that exist among the different project parameters can
be satisfactorily modelled using suitable mathematical expressions. Once the basic (independent)
parameters are known, the other (dependent) parameters can be easily determined by substituting the
values of the independent parameters in the corresponding mathematical expression. Different heuristic
estimation models can be divided into the following two broad categories—single variable and
multivariable models.
Single variable estimation models assume that various project characteristic can be predicted based on a
single previously estimated basic (independent) characteristic of the software such as its size. A single
variable estimation model assumes that the relationship between a parameter to be estimated and the
corresponding independent parameter can be characterised by an expression of the following form:
Estimated Parameter = c1 ed1
In the above expression, e represents a characteristic of the software that has already been estimated
(independent variable). Estimated parameter is the dependent parameter (to be estimated). The
dependent parameter to be estimated could be effort, project duration, staff size, etc., c1 and d1 are
constants. The values of the constants c1 and d1 are usually determined using data collected from past
projects (historical data). The COCOMO model is an example of a single variable cost estimation model.
A multivariable cost estimation model assumes that a parameter can be predicted based on the values of
more than one independent parameter. It takes the following form:
Estimated Resource = c1 p1d1 + c2 p2d2+ ...
where, p1, p2, ... are the basic (independent) characteristics of the software already estimated, and c1, c2,
d1, d2, .... are constants.
Multivariable estimation models are expected to give more accurate estimates compared to the single
variable models, since a project parameter is typically influenced by several independent parameters. The
independent parameters influence the dependent parameter to different extents. This is modelled by the
different sets of constants c1 , d1 , c2 , d2 , .... Values of these constants are usually determined from an
analysis of historical data. The intermediate COCOMO model can be considered to be an example of a
multivariable estimation model.
COCOMO:
Halstead’s Software Science:
Project scheduling:
Project Scheduling in a project refers to roadmap of all activities to be done with specified order
and within time slot allotted to each activity. Project managers tend to define various tasks, and project
milestones and then arrange them keeping various factors in mind. They look for tasks like in critical path
in the schedule, which are necessary to complete in specific manner (because of task interdependency)
and strictly within the time allocated. Arrangement of tasks which lies out of critical path are less likely to
impact over all schedule of the project.
For scheduling a project, it is necessary to -
staffing:
Organization and team structure:
Risk management:
Risk management involves all activities pertaining to identification, analyzing and making provision
for predictable and non-predictable risks in the project. Risk may include the following:
• Experienced staff leaving the project and new staff coming in.
• Change in organizational management.
• Requirement change or misinterpreting requirement.
• Under-estimation of required time and resources.
• Technological changes, environmental changes, business competition.
• Identification - Make note of all possible risks, which may occur in the project.
• Categorize - Categorize known risks into high, medium and low risk intensity as per their possible
impact on the project.
• Manage - Analyse the probability of occurrence of risks at various phases.
Make plan to avoid or face risks. Attempt to minimize their side-effects.
• Monitor - Closely monitor the potential risks and their early symptoms.
Also monitor the effective steps taken to mitigate or avoid them.
configuration management:
Experienced developers take considerable time to understand the exact requirements of the
customer and to meticulously document those. They know that without a clear understanding of the
problem and proper documentation of the same, it is impossible to develop a satisfactory solution.
For any type of software development project, availability of a good quality requirements
document has been acknowledged to be a key factor in the successful completion of the project. A good
requirements document not only helps to form a clear understanding of various features required from
the software, but also serves as the basis for various activities carried out during later life cycle phases.
When software is developed in a contract mode for some other organisation (that is, an outsourced
project), the crucial role played by documentation of the precise requirements cannot be overstated. Even
when an organisation develops a generic software product, the situation is not very different since some
personnel from the organisation’s own marketing department act as the customer. Therefore, for all types
of software development projects, proper formulation of requirements and their effective documentation
is vital. However, for very small software service projects, the agile methods advocate incremental
development of the requirements.
An overview of requirements analysis and specification phase:
The requirements analysis and specification phase ends when the requirements specification
document has been developed and reviewed. The requirements specification document is usually called as
the software requirements specification (SRS) document. The goal of the requirements analysis and
specification phase can be stated in a nutshell as follows.
The goal of the requirements analysis and specification phase is to clearly understand the customer
requirements and to systematically organise the requirements into a document called the Software
Requirements Specification (SRS) document.
Who carries out requirements analysis and specification?
The engineers who gather a n d analyse customer requirements and then write the requirements
specification document are known as system analysts in the software industry parlance. System analysts
collect data pertaining to the product to be developed and analyse the collected data to conceptualise
what exactly needs to be done. After understanding the precise user requirements, the analysts analyse
the requirements to weed out inconsistencies, anomalies and incompleteness. They then proceed to write
the software requirements specification (SRS) document.
The SRS document is the final outcome of the requirements analysis and specification phase.
The nature of software:
Today, software takes on a dual role. It is a product at the same time, the vehicle for delivering a
product. As a product, it delivers the computing potential embodied by computer hardware or network of
computers, accessible by a local hardware. Whether it resides with a mobile phone or operates inside a
mainframe computer. Software is an information transformer- producing, managing, acquiring, modifying,
displaying, or transmitting information. As the vehicle to deliver the product, software acts as the basics
for the control of computer(operating systems), the communication of information(networks), and the
creation and control of other programs(software tools and environment).
Software delivers most important product of our time -information. It transforms personal
data(e.g., an individual’s financial transactions) so that the data can be more useful in a local context; it
provides a gate way to worldwide information networks(e.g., the network), and provides the means of
acquiring information of all its forms.
Today, a huge software industry has become a dominant factor in the economies of the
industrialised world.
The Unique nature of Webapps:
In the early days of the world wide web (1990 – 1995), websites consisted of little more than a set
of linked hypertext files that presented information using text and limited graphics.
Today, webapps have evolved into sophisticated computing tools that not only provide stand-alone
function to the end user, but also been integrated with corporate databases and business applications due
to the development of HTML, Java, XML etc.
The following are the attributes encountered in the vast majority of the web apps:
• Network insensitiveness: A webapp resides on a network and must serve the need of a diverse
community of clients. The network may enable worldwide access and communication (i.e., the
internet) or more limited access and communication (e.g.: a corporate internet).
• Concurrency: A large number of users may access the webapps at one time. In many cases, the
patterns of usage among end users will vary greatly.
• Unpredictable load: The number of users of the webapp may vary from day to day. 100 users may
show up on Monday; 10,000 may use on Thursday.
• Performance: If a webapp user must wait too long, he or she may decide to go elsewhere.
• Availability: Users of popular webapps may demand access on a 24/7/365 basis.
• Data driven: The primary function of many webapps is to use hypermedia to text, graphics, audio
and video content to the end user.
• Content sensitive:
• Continuous evolution: Unlike conventions application software, web applications evolve
continuously.
• Immediacy: Immediacy is a need to get software to market quickly. Webapps often exhibit a time-
to-market that can be a matter of a few days or weeks.
• Security: Webapps are available via network. In order to protect sensitive content and provide
secure modes of data transmission, strong security measures must be implemented throughout
the infrastructure of a webapp and within the application itself.
• Aesthetics: An undeniable part of webapp is its look and feel. When an application has been
designed to market or sell products or ideas, aesthetics may have as much to do as technical
design.
Software Myths:
Software myths: erroneous beliefs about software and the process that is used to build it. Myths
have a number of attributes that make them insidious.
Today, most knowledgeable software engineering professionals recognise myths that have caused
serious problems for managers and practitioners alike.
Management myths: Managers are often under pressure to maintain budgets, keep schedules from
slipping and improve quality.
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? Does it reflect modern software
engineering practice? Is it complete? Is it adaptable? 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: If we get behind schedule, we can add more programmers and catchup (sometimes called
the “Mongolian horde” concept).
Reality: Software development is not a mechanical process, like manufacturing. At first, the
statement may seem counterintuitive. However, as new people are added, people who were
working must spend time educating the newcomers, thereby it reduces the time of productivity.
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 organisation does not understand how to manage and control software project
internally, it will invariably struggle when it outsources software projects.
Customer myths: In many cases, 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.
Myth: A general statement of objective is sufficient to begin writing programs – we can fill in
details later.
Reality: Although a comprehensive and stable statement of requirements is not always possible, an
ambiguous “statement of objectives” is a recipe for disaster. Unambiguous requirements (usually
derived iteratively) are developed only through effective and continuous communication between
customer and developer.
Requirements gathering and analysis:
The requirements have to be gathered by the analyst from several sources in bits and pieces. These
gathered requirements need to be analysed to remove several types of problems that frequently occur in
the requirements. We can conceptually divide the requirements gathering and analysis activity into two
separate tasks:
• Requirements gathering
• Requirement’s analysis
Requirements gathering:
Requirements gathering is also popularly known as requirements elicitation. The primary objective
of the requirements gathering task is to collect the requirements from the stakeholders.
A stakeholder is a source of the requirements and is usually a person, or a group of persons who
either directly or indirectly are concerned with the software.
Requirements gathering may sound like a simple task. However, in practice it is very difficult to gather
all the necessary information from a large number of stakeholders and from information scattered across
several pieces of documents. Gathering requirements turns out to be especially challenging if there is no
working model of the software being developed. the important ways in which an experienced analyst
gathers requirements:
1.Studying existing documentation: The analyst usually studies all the available documents regarding
the system to be developed before visiting the customer site. Customers usually provide statement of
purpose (Sop) document to the developers. Typically, these documents might discuss issues such as the
context in which the software is required, the basic purpose, the stakeholders, features of any similar
software developed elsewhere, etc.
2.Interview: Typically, there are many different categories of users of a software. Each category of users
typically requires a different set of features from the software. Therefore, it is important for the analyst to
first identify the different categories of users and then determine the requirements of each. For example,
the different categories of users of a library automation software could be the library members, the
librarians, and the accountants. The library members would like to use the software to query availability of
books and issue and return books. The librarians might like to use the software to determine books that
are overdue, create member accounts, delete member accounts, etc. The accounts personnel might use
the software to invoke functionalities concerning financial aspects such as the total fee collected from the
members, book procurement expenditures, staff salary expenditures, etc.
To systematise this method of requirements gathering, the Delphi technique can be followed. In this
technique, the analyst consolidates the requirements as understood by him in a document and then
circulates it for the comments of the various categories of users. Based on their feedback, he refines his
document. This procedure is repeated till the different users agree on the set of requirements.
3.Task analysis: The users usually have a black-box view of a software and consider the software as
something that provides a set of services (functionalities). A service supported by a software is also called a
task. We can therefore say that the software performs various tasks of the users. In this context, the
analyst tries to identify and understand the different tasks to be performed by the software. For each
identified task, the analyst tries to formulate the different steps necessary to realise the required
functionality in consultation with the users. For example, for the issue book service, the steps may be—
authenticate user, check the number of books issued to the customer and determine if the maximum
number of books that this member can borrow has been reached, check whether the book has been
reserved, post the book issue details in the member’s record, and finally print out a book issue slip that can
be presented by the member at the security counter to take the book out of the library premises.
Task analysis helps the analyst to understand the nitty-gritty of various user tasks and to
represent each task as a hierarchy of subtasks.
Scenario analysis: A task can have many scenarios of operation. The different scenarios of a task may take
place when the task is invoked under different situations. For different types of scenarios of a task, the
behaviour of the software can be different. For example, the possible scenarios for the book issue task of a
library automation software may be:
Book is issued successfully to the member and the book issue slip is printed.
The book is reserved, and hence cannot be issued to the member. The maximum number of books
that can be issued to the member is already reached, and no more books can be issued to the
member.
For various identified tasks, the possible scenarios of execution are identified and the details of each
scenario is identified in consultation with the users. For each of the identified scenarios, details regarding
system response, the exact conditions under which the scenario occurs, etc. are determined in
consultation with the user.
Form analysis: Form analysis is an important and effective requirements gathering activity that is
undertaken by the analyst, when the project involves automating an existing manual system. During the
operation of a manual system, normally several forms are required to b e filled up by the stakeholders, and
in turn they receive several notifications (usually manually filled forms). In form analysis the exiting forms
and the formats of the notifications produced are analysed to determine the data input to the system and
the data that are output from the system. For the different sets of data input to the system, how these
input data would be used by the system to produce the corresponding output data is determined from the
users.
Requirement’s analysis:
The main purpose of the requirements analysis activity is to analyse the gathered requirements to
remove all ambiguities, incompleteness, and inconsistencies from the gathered customer requirements
and to obtain a clear understanding of the software to be developed.
During requirements analysis, the analyst needs to identify and resolve three main types of problems in
the requirements:
• Anomaly
• Inconsistency
• Incompleteness
Let us examine these different types of requirements problems in detail.
Anomaly: It is an anomaly is an ambiguity in a requirement. When a requirement is anomalous, several
interpretations of that requirement are possible. Any anomaly in any of the requirements can lead to the
development of an incorrect system, since an anomalous requirement can be interpreted in the several
ways during development.
Example: While gathering the requirements for a process control application, the following requirement
was expressed by a certain stakeholder: When the temperature becomes high, the heater should be
switched off. Please note that words such as “high”, “low”, “good”, “bad” etc. are indications of ambiguous
requirements as these lack quantification and can be subjectively interpreted. If the threshold above which
the temperature can be considered to be high is not specified, then it can be interpreted differently by
different developers.
Inconsistency: Two requirements are said to be inconsistent, if one of the requirements contradicts the
other. The following are two examples of inconsistent requirements:
Example: Consider the following two requirements that were collected from two different stakeholders in
a process control application development project.
The furnace should be switched-off when the temperature of the furnace rises above 500 C.
When the temperature of the furnace rises above 500 C, the water shower should be switched-on
and the furnace should remain on.
Traceable: It should be possible to trace a specific requirement to the design elements that implement it
and vice versa. Similarly, it should be possible to trace a requirement to the code segments that implement
it and the test cases that test this requirement and vice versa. Traceability is also important to verify the
results of a phase with respect to the previous phase and to analyse the impact of changing a requirement
on the design elements and the code.
Modifiable: Customers frequently change the requirements during the software development due to a
variety of reasons. Therefore, in practice the SRS document undergoes several revisions during software
development. Also, an SRS document is often modified after the project completes to accommodate future
enhancements and evolution. To cope up with the requirements changes, the SRS document should be
easily modifiable. For this, an SRS document should be well-structured. A well-structured document is easy
to understand and modify. Having the description of a requirement scattered across many places in the
SRS document may not be wrong—but it tends to make the requirement difficult to understand and also
any modification to the requirement would become difficult as it would require changes to be made at
large number of places in the document.
Identification of response to undesired events: The SRS document should discuss the system responses to
various undesired events and exceptional conditions that may arise.
Verifiable: All requirements of the system as documented in the SRS document should be verifiable. This
means that it should be possible to design test cases based on the description of the functionality as to
whether or not requirements have been met in an implementation. A requirement such as “the system
should be user friendly” is not verifiable. On the other hand, the requirement—“When the name of a book
is entered, the software should display whether the book is available for issue or it has been loaned out” is
verifiable. Any feature of the required system that is not verifiable should be listed separately in the goals
of the implementation section of the SRS document.
Decision table
A decision table shows the decision-making logic and the corresponding actions taken in a tabular or
a matrix form. The upper rows of the table specify the variables or conditions to be evaluated and
the lower rows specify the actions to be taken when an evaluation test is satisfied. A column in the
table is called a rule. A rule implies that if a certain condition combination is true, then the
corresponding action is executed. The decision table for the
LMS problem of Example 4.10 is as shown in Table 4.1.
Table 4.1: Decision Table for the LMS Problem
Conditions
Generate bill × ×
Print cheque ×
Delete record ×
A design solution is said to be highly modular, if the different modules in the solution have high cohesion
and their inter-module couplings are low.
Coupling: Coupling is the measure of the degree of interdependence between the modules. A good
software will have low coupling.
Types of Coupling:
• Data Coupling: If the dependency between the modules is based on the fact that they
communicate by passing only data, then the modules are said to be data coupled. In data
coupling, the components are independent to each other and communicating through data.
Module communications don’t contain tramp data. Example-customer billing system.
• Stamp Coupling In stamp coupling, the complete data structure is passed from one module to
another module. Therefore, it involves tramp data. It may be necessary due to efficiency
factors- this choice made by the insightful designer, not a lazy programmer.
• Control Coupling: If the modules communicate by passing control information, then they are
said to be control coupled. It can be bad if parameters indicate completely different behavior
and good if parameters allow factoring and reuse of functionality. Example- sort function that
takes comparison function as an argument.
• External Coupling: In external coupling, the modules depend on other modules, external to
the software being developed or to a particular type of hardware. Ex- protocol, external file,
device format, etc.
• Common Coupling: The modules have shared data such as global data structures. The
changes in global data mean tracing back to all modules which access that data to evaluate
the effect of the change. So it has got disadvantages like difficulty in reusing modules,
reduced ability to control data accesses and reduced maintainability.
• Content Coupling: In a content coupling, one module can modify the data of another module
or control flow is passed from one module to the other module. This is the worst form of
coupling and should be avoided.
Cohesion: Cohesion is a measure of the degree to which the elements of the module are functionally
related. It is the degree to which all elements directed towards performing a single task are contained in
the component. Basically, cohesion is the internal glue that keeps the module together. A good software
design will have high cohesion.
Types of Cohesion:
• Functional Cohesion: Every essential element for a single computation is contained in the
component. A functional cohesion performs the task and functions. It is an ideal situation.
• Sequential Cohesion: An element outputs some data that becomes the input for other
element, i.e., data flow between the parts. It occurs naturally in functional programming
languages.
• Communicational Cohesion: Two elements operate on the same input data or contribute
towards the same output data. Example- update record in the database and send it to the
printer.
• Procedural Cohesion: Elements of procedural cohesion ensure the order of execution. Actions
are still weakly connected and unlikely to be reusable. Ex- calculate student GPA, print
student record, calculate cumulative GPA, print cumulative GPA.
• Temporal Cohesion: The elements are related by their timing involved. A module connected
with temporal cohesion all the tasks must be executed in the same time-span. This cohesion
contains the code for initializing all the parts of the system. Lots of different activities occur,
all at unit time.
• Logical Cohesion: The elements are logically related and not functionally. Ex- A component
reads inputs from tape, disk, and network. All the code for these functions is in the same
component. Operations are related, but the functions are significantly different.
• Coincidental Cohesion: The elements are not related(unrelated). The elements have no
conceptual relationship other than location in source code. It is accidental and the worst form
of cohesion. Ex- print next line and reverse the characters of a string in a single component.
Control Hierarchy:
Layering:
A layered design is one in which when the call relations among different modules are represented
graphically, it would result in a tree-like diagram with clear layering. In a layered design solution, the
modules are arranged in a hierarchy of layers.
An important characteristic feature of a good design solution is layering of the modules. A
layered design achieves control abstraction and is easier to understand and debug.
In a layered design, the top-most module in the hierarchy can be considered as a manager that only
invokes the services of the lower-level module to discharge its responsibility. The modules at the
intermediate layers offer services to their higher layer by invoking the services of the lower layer modules
and also by doing some work themselves to a limited extent. The modules at the lowest layer are the
worker modules.
In the following, we discuss some important concepts and terminologies associated with a layered
design:
Superordinate and subordinate modules: In a control hierarchy, a module that controls another module is
said to be superordinate to it. Conversely, a module controlled by another module is said to be
subordinate to the controller.
Visibility: A module B is said to be visible to another module A, if A directly calls B. Thus, only the
immediately lower layer modules are said to be visible to a module.
Control abstraction: In a layered design, a module should only invoke the functions of the modules that
are in the layer immediately below it. In other words, the modules at the higher layers, should not be
visible (that is, abstracted out) to the modules at the lower layers. This is referred to as control abstraction.
Depth and width: Depth and width of a control hierarchy provide an indication of the number of layers
and the overall span of control respectively.
From the above figure, the depth is 3 and width is also 3.
Fan-out: Fan-out is a measure of the number of modules that are directly controlled by a given module. In
above Figure, the fan-out of the module M1 is 3. A design in which the modules have very high fan-out
numbers is not a good design. The reason for this is that a very high fan-out is an indication that the
module lacks cohesion. A module having a large fan-out (greater than 7) is likely to implement several
different functions and not just a single cohesive function.
Fan-in: Fan-in indicates the number of modules that directly invoke a given module. High fan-in represents
code reuse and is in general, desirable in a good design. In above Figure, the fan-in of the module M1 is 0,
that of M2 is 1, and that of M5 is 2.
Object-oriented Design:
In the object-oriented design (OOD) approach, a system is viewed as being made up of a collection
of objects (i.e., entities). Each object is associated with a set of functions that are called its methods. Each
object contains its own data and is responsible for managing it. The data internal to an object cannot be
accessed directly by other objects and only through invocation of the methods of the object. The system
state is decentralised since there is no globally shared data in the system and data is stored in each object.
For example, in a library automation software, each library member may be a separate object with its own
data and functions to operate on the stored data. The methods defined for one object cannot directly
refer to or change the data of other objects.
The object-oriented design paradigm makes extensive use of the principles of abstraction and
decomposition. Objects decompose a system into functionally independent modules. Objects can also be
considered as instances of abstract data types (ADTs). ADT is an important concept that forms an
important pillar of object orientation. There are three important concepts associated with an ADT—data
abstraction, data structure, data type. We discuss these in the following subsection:
Data abstraction: The principle of data abstraction implies that how data is exactly stored is abstracted
away. This means that any entity external to the object (that is, an instance of an ADT) would have no
knowledge about how data is exactly stored, organised, and manipulated inside the object. The entities
external to the object can access the data internal to an object only by calling certain well-defined
methods supported by the object. Consider an ADT such as a stack. The data of a stack object may
internally be stored in an array, a linearly linked list, or a bidirectional linked list. The external entities have
no knowledge of this and can access data of a stack object only through the supported operations such as
push and pop.
Data structure: A data structure is constructed from a collection of primitive data items. Just as a civil
engineer builds a large civil engineering structure using primitive building materials such as bricks, iron
rods, and cement; a programmer can construct a data structure as an organised collection of primitive
data items such as integer, floating point numbers, characters, etc.
Data type: A type is a programming language terminology that refers to anything that can be instantiated.
For example, int, float, char etc., are the basic data types supported by C programming language. Thus, we
can say that ADTs are user defined data types.
In object-orientation, classes are ADTs. Let us examine the three main advantages of using ADTs in
programs:
The data of objects are encapsulated within the methods. The encapsulation principle is also known as
data hiding. The encapsulation principle requires that data can be accessed and manipulated only through
the methods supported by the object and not directly. This localises the errors. The reason for this is as
follows. No program element is allowed to change a data, except through invocation of one of the
methods. So, any error can easily be traced to the code segment changing the value. That is, the method
that changes a data item, making it erroneous can be easily identified.
An ADT-based design displays high cohesion and low coupling. Therefore, object- oriented designs are
highly modular.
Since the principle of abstraction is used, it makes the design solution easily understandable and helps to
manage complexity.
Similar objects constitute a class. In other words, each object is a member of some class. Classes may
inherit features from a super class. Conceptually, objects communicate by message passing. Objects have
their own internal data. Thus, an object may exist in different states depending the values of the internal
data. In different states, an object may behave differently.
Object oriented vs. function-oriented design:
The following are some of the important differences between the function-oriented and object-oriented
design:
Unlike function-oriented design methods in OOD, the basic abstraction is not the services available
to the users of the system such as issue book, display-book-details, find-issued-books, etc., but
real-world entities such as member, book, book-register, etc. For example, In OOD, an employee
pay-roll software is not developed by designing functions such as update-employee-record, get-
employee-address, etc., but by designing objects such as employees, departments, etc.
In OOD, state information exists in the form of data distributed among several objects of the
system. In contrast, in a procedural design, the state information is available in a centralised
shared data store. For example, while developing an employee pay-roll system, the employee
data such as the names of the employees, their code numbers, basic salaries, etc., are usually
implemented as global data in a traditional programming system; whereas in an object-oriented
design, these data are distributed among different employee objects of the system. Objects
communicate by message passing. Therefore, one object may discover the state information of
another object by sending a message to it. Of course, somewhere or other the real-world
functions must be implemented.
Function-oriented techniques group functions together if, as a group, they constitute a higher-level
function. On the other hand, object-oriented techniques group functions together on the basis of
the data they operate on.
The roles of structured analysis (SA) and structured design (SD) have been shown schematically in Figure
6.1. Observe the following from the figure:
During structured analysis, the SRS document is transformed into a data flow diagram (DFD) model.
During structured design, the DFD model is transformed into a structure chart.
As shown in Figure 6.1, the structured analysis activity transforms the SRS document into a graphic
model called the DFD model. During structured analysis, functional decomposition of the system is
achieved. That is, each function that the system needs to perform is analysed and hierarchically
decomposed into more detailed functions. On the other hand, during structured design, all functions
identified during structured analysis are mapped to a module structure. This module structure is also called
the highlevel design or the software architecture for the given problem. This is represented using a
structure chart.
The high-level design stage is normally followed by a detailed design stage. During the detailed design
stage, the algorithms and data structures for the individual modules are designed. The detailed design can
directly be implemented as a working system using a conventional programming language.
Structured analysis:
Significant contributions to the development of the structured analysis techniques have been made
by Gane and Sarson [1979], and DeMarco and Yourdon [1978]. The structured analysis technique is based
on the following underlying principles:
• Top-down decomposition approach.
• Application of divide and conquer principle. Through this each high-level function is independently
decomposed into detailed functions.
• Graphical representation of the analysis results using data flow diagrams (DFDs).
Data flow diagram:
A DFD is a hierarchical graphical model of a system that shows the different processing activities or
functions that the system performs and the data interchange among those functions.
The DFD (also known as the bubble chart) is a simple graphical formalism that can be used to
represent a system in terms of the input data to the system, various processing carried out on those data,
and the output data generated by the system. The main reason why the DFD technique is so popular is
probably because of the fact that DFD is a very simple formalism— it is simple to understand and use. A
DFD model uses a very limited number of primitive symbols to represent the functions performed by a
system and the data flow among these functions.
Hierarchical model starts with a very abstract model of a system, various details of the system are
slowly introduced through different levels of the hierarchy. The DFD technique is also based on a very
simple set of intuitive concepts and rules. We now elaborate the different concepts associated with
building a DFD model of a system.
There are essentially five different types of symbols used for constructing DFDs.
Function symbol: A function is represented using a circle. This symbol is called a process or a bubble.
Bubbles are annotated with the names of the corresponding functions (see Figure 6.3).
External entity symbol: An external entity such as a librarian, a library member, etc. is represented by a
rectangle. The external entities are essentially those physical entities external to the software system
which interact with the system by inputting data to the system or by consuming the data produced by the
system. In addition to the human users, the external entity symbols can be used to represent external
hardware and software such as another application software that would interact with the software being
modelled.
Data flow symbol: A directed arc (or an arrow) is used as a data flow symbol. A data flow symbol
represents the data flow occurring between two processes or between an external entity and a process in
the direction of the data flow arrow. Data flow symbols are usually annotated with the corresponding data
names. For example the DFD in Figure 6.3(a) shows three data flows—the data item number flowing from
the process read-number to validate-number, dataitem flowing into read-number, and valid-number flowing
out of validate-number.
Data store symbol: A data store is represented using two parallel lines. It represents a logical file. That is,
a data store symbol can represent either a data structure or a physical file on disk. Each data store is
connected to a process by means of a data flow symbol. The direction of the data flow arrow shows
whether data is being read from or written into a data store. An arrow flowing in or out of a data store
implicitly represents the entire data of the data store and hence arrows connecting t o a data store need
not be annotated with the name of the corresponding data items. As an example of a data store, number is
a data store in Figure 6.3(b).
Output symbol: The output symbol i s as shown in Figure 6.2. The output symbol is used when a hard
copy is produced.
The notations that we are following in this text are closer to the Yourdon’s notations than to the other
notations. You may sometimes find notations in other books that are slightly different than those discussed
here. For example, the data store may look like a box with one end open. That is because, they may be
following notations such as those of Gane and Sarson [1979].
Control specifications represents the behavior of the system in two different ways:
It contains a state transition diagram (STD). The STD is a sequential specification of behaviour.
It contains a program activation table (PAT). The PAT is a combinatorial specification of behaviour.
PAT represents invocation sequence of bubbles in a DFD.
UML Diagrams: The UML diagrams are categorized into structural diagrams, behavioural diagrams, and
also interaction overview diagrams. The diagrams are hierarchically classified in the following figure:
1. Structural Diagrams
Structural diagrams depict a static view or structure of a system. It is widely used in the documentation of
software architecture. It embraces class diagrams, composite structure diagrams, component diagrams,
deployment diagrams, object diagrams, and package diagrams. It presents an outline for the system. It
stresses the elements to be present that are to be modeled.
o Class Diagram: Class diagrams are one of the most widely used diagrams. It is the backbone of all the
object-oriented software systems. It depicts the static structure of the system. It displays the system's
class, attributes, and methods. It is helpful in recognizing the relation between different objects as
well as classes.
o Composite Structure Diagram: The composite structure diagrams show parts within the class. It
displays the relationship between the parts and their configuration that ascertain the behavior of the
class. It makes full use of ports, parts, and connectors to portray the internal structure of a structured
classifier. It is similar to class diagrams, just the fact it represents individual parts in a detailed manner
when compared with class diagrams.
o Object Diagram: It describes the static structure of a system at a particular point in time. It can be
used to test the accuracy of class diagrams. It represents distinct instances of classes and the
relationship between them at a time.
o Component Diagram: It portrays the organization of the physical components within the system. It
is used for modeling execution details. It determines whether the desired functional requirements
have been considered by the planned development or not, as it depicts the structural relationships
between the elements of a software system.
o Deployment Diagram: It presents the system's software and its hardware by telling what the existing
physical components are and what software components are running on them. It produces
information about system software. It is incorporated whenever software is used, distributed, or
deployed across multiple machines with dissimilar configurations.
o Package Diagram: It is used to illustrate how the packages and their elements are organized. It shows
the dependencies between distinct packages. It manages UML diagrams by making it easily
understandable. It is used for organizing the class and use case diagrams.
2. Behavioral Diagrams:
Behavioral diagrams portray a dynamic view of a system or the behavior of a system, which describes the
functioning of the system. It includes use case diagrams, state diagrams, and activity diagrams. It defines the
interaction within the system.
o State Machine Diagram: It is a behavioral diagram. it portrays the system's behavior utilizing finite
state transitions. It is also known as the State-charts diagram. It models the dynamic behavior of a
class in response to external stimuli.
o Activity Diagram: It models the flow of control from one activity to the other. With the help of an
activity diagram, we can model sequential and concurrent activities. It visually depicts the workflow
as well as what causes an event to occur.
o Use Case Diagram: It represents the functionality of a system by utilizing actors and use cases. It
encapsulates the functional requirement of a system and its association with actors. It portrays the
use case view of a system.
3. Interaction Diagrams
Interaction diagrams are a subclass of behavioral diagrams that give emphasis to object interactions and also
depicts the flow between various use case elements of a system. In simple words, it shows how objects
interact with each other and how the data flows within them. It consists of communication, interaction
overview, sequence, and timing diagrams.
o Sequence Diagram: It shows the interactions between the objects in terms of messages exchanged
over time. It delineates in what order and how the object functions are in a system.
o Communication Diagram: It shows the interchange of sequence messages between the objects. It
focuses on objects and their relations. It describes the static and dynamic behavior of a system.
o Timing Diagram: It is a special kind of sequence diagram used to depict the object's behavior over a
specific period of time. It governs the change in state and object behavior by showing the time and
duration constraints.
o Interaction Overview diagram: It is a mixture of activity and sequence diagram that depicts a
sequence of actions to simplify the complex interactions into simple interactions.
Structured design:
Detailed design:
Design review:
Characteristics of a good user interface:
User Guidance and Online Help:
Mode-based Vs Mode-less Interface:
Types of user interfaces:
Component-based GUI development:
User interface design methodology: GUI design methodology
CODING:
The input to the coding phase is the design document produced at the end of the design phase.
Design document contains not only the high-level design of the system in the form of a module structure
(e.g., a structure chart), but also the detailed design. During the coding phase, different modules identified
in the design document are coded according to their respective module specifications.
The objective of the coding phase is to transform the design of a system into code in a high-level
language, and then to unit test this code.
Software development organisations formulate their own coding standards that suit them the
most, and require their developers to follow the standards rigorously. A coding standard gives a uniform
appearance to the codes written by different engineers. It facilitates code understanding and code reuse.
It promotes good programming practices.
It is mandatory for the programmers to follow the coding standards. Compliance of their code to
coding standards is verified during code inspection. Any code that does not conform to the coding
standards is rejected during code review and the code is reworked by the concerned programmer. In
contrast, coding guidelines provide some general suggestions regarding the coding style to be followed but
leave the actual implementation of these guidelines to the discretion of the individual developers.
Coding standards and guidelines:
Good software development organisations usually develop their own coding standards and
guidelines depending on what suits their organisation best and based on the specific types of software
they develop. To give an idea about the types of coding standards that are being used, we shall only list
some general coding standards and guidelines that are commonly adopted by many software
development organisations, rather than trying to provide an exhaustive list.
Representative coding standards:
Rules for limiting the use of global: These rules list what types of data can be declared global and what
cannot, with a view to limit the data that needs to be defined with global scope.
Standard headers for different modules: The header of different modules should have standard format
and information for ease of understanding and maintenance. The following is an example of header format
that is being used in some companies:
Naming conventions for global variables, local variables, and constant identifiers: A popular
naming convention is that variables are named using mixed case lettering. Global variable names
would always start with a capital letter (e.g., Global Data) and local variable names start with small
letters (e.g., local Data). Constant names should be formed using capital letters only (e.g.,
CONSTDATA).
Conventions regarding error return values and exception handling mechanisms: The way error conditions
are reported by different functions in a program should be standard within an organisation. For example,
all functions while encountering an error condition should either return a 0 or 1 consistently, independent
of which programmer has written the code. This facilitates reuse and debugging.
Representative coding guidelines: The following are some representative coding guidelines that are
recommended by many software development organisations. Wherever necessary, the rationale behind
these guidelines is also mentioned.
Do not use a coding style that is too clever or too difficult to understand: Code should be easy to
understand. Many inexperienced engineers actually take pride in writing cryptic and incomprehensible
code. Clever coding can obscure meaning of the code and reduce code understandability; thereby making
maintenance and debugging difficult and expensive.
Avoid obscure side effects: The side effects of a function call include modifications to the parameters
passed by reference, modification of global variables, and I/O operations. An obscure side effect is one that
is not obvious from a casual examination of the code. Obscure side effects make it difficult to understand a
piece of code. For example, suppose the value of a global variable is changed or some file I/O is performed
obscurely in a called module. That is, this is difficult to infer from the function’s name and header
information. Then, it would be really hard to understand the code.
Do not use an identifier for multiple purposes: Programmers often use the same identifier to denote
several temporary entities. For example, some programmers make use of a temporary loop variable for
also computing and storing the final result. The rationale that they give for such multiple use of variables is
memory efficiency, e.g., three variables use up three memory locations, whereas when the same variable
is used for three different purposes, only one memory location is used. However, there are several things
wrong with this approach and hence should be avoided. Some of the problems caused by the use of a
variable for multiple purposes are as follows:
Each variable should be given a descriptive name indicating its purpose. This is not possible if an
identifier is used for multiple purposes. Use of a variable for multiple purposes can lead to
confusion and make it difficult for somebody trying to read and understand the code.
Use of variables for multiple purposes usually makes future enhancements more difficult. For
example, while changing the final computed result from integer to float type, the programmer
might subsequently notice that it has also been used as a temporary loop variable that cannot be
a float type.
Code should be well-documented: As a rule of thumb, there should be at least one comment line on
the average for every three source lines of code.
Length of any function should not exceed 10 source lines: A lengthy function is usually very difficult to
understand as it probably has a large number of variables and carries out many different types of
computations. For the same reason, lengthy functions are likely to have disproportionately larger number
of bugs.
Do not use GO TO statements: Use of GO TO statements makes a program unstructured. This makes the
program very difficult to understand, debug, and maintain.
Code review:
Code review is a very effective technique to remove defects from source code. In fact, review has
been acknowledged to be more cost-effective in removing defects as compared to testing.
Code review for a module is undertaken after the module successfully compiles. That is, all the syntax
errors have been eliminated from the module. Code review is designed to syntax errors, detect logical,
algorithmic, and programming errors. Code review has been recognised as an extremely cost-effective
strategy for eliminating coding errors and for producing high quality code.
The reason behind why code review is a much more cost-effective strategy to eliminate errors from code
compared to testing is that reviews directly detect errors. On the other hand, testing only helps detect
failures and significant effort is needed to locate the error during debugging.
The rationale behind the above statement is explained as follows. Eliminating an error from code involves
three main activities—testing, debugging, and then correcting the errors. Testing is carried out to detect if
the system fails to work satisfactorily for certain types of inputs and under certain circumstances. Once a
failure is detected, debugging is carried out to locate the error that is causing the failure and to remove it.
Of the three testing activities, debugging is possibly the most laborious and time-consuming activity. In
code inspection, errors are directly detected, thereby saving the significant effort that would have been
required to locate the error.
Normally, the following two types of reviews are carried out on the code of a module:
• Code inspection.
• Code walkthrough.
The procedures for conduction and the final objectives of these two review techniques are very different.
In the following two subsections, we discuss these two code review techniques.
Code Walkthrough:
Code walkthrough is an informal code analysis technique. In this technique, a module is taken up for
review after the module has been coded, successfully compiled, and all syntax errors have been
eliminated. A few members of the development team are given the code a couple of days before the
walkthrough meeting. Each member selects some test cases and simulates execution of the code by hand
(i.e., traces the execution through different statements and functions of the code).
The main objective of code walkthrough is to discover the algorithmic and logical errors in the code.
The members note down their findings of their walkthrough and discuss those in a walkthrough meeting
where the coder of the module is present.
Even though code walkthrough is an informal analysis technique, several guidelines have evolved over the
years for making this naive but useful analysis technique more effective. These guidelines are based on
personal experience, common sense, several other subjective factors. Therefore, these guidelines should
be considered as examples rather than as accepted rules to be applied dogmatically. Some of these
guidelines are following:
The team performing code walkthrough should not be either too big or too small. Ideally, it should
consist of between three to seven members.
Discussions should focus on discovery of errors and avoid deliberations on how to fix the discovered
errors.
In order to foster co-operation and to avoid the feeling among the engineers that they are being watched
and evaluated in the code walkthrough meetings, managers should not attend the walkthrough meetings.
Code Inspection:
During code inspection, the code is examined for the presence of some common programming errors. This
is in contrast to the hand simulation of code execution carried out during code walkthroughs. We can state
the principal aim of the code inspection to be the following:
The principal aim of code inspection is to check for the presence of some common types of errors that
usually creep into code due to programmer mistakes and oversights and to check whether coding
standards have been adhered to.
The inspection process has several beneficial side effects, other than finding errors. The programmer
usually receives feedback on programming style, choice of algorithm, and programming techniques. The
other participants gain by being exposed to another programmer’s errors.
As an example of the type of errors detected during code inspection, consider the classic error of writing a
procedure that modifies a formal parameter and then calls it with a constant actual parameter. It is more
likely that such an error can be discovered by specifically looking for this kinds of mistakes in the code,
rather than by simply hand simulating execution of the code. In addition to the commonly made errors,
adherence to coding standards is also checked during code inspection.
Good software development companies collect statistics regarding different types of errors that are
commonly committed by their engineers and identify the types of errors most frequently committed. Such
a list of commonly committed errors can be used as a checklist during code inspection to look out for
possible errors.
Following is a list of some classical programming errors which can be checked during code inspection:
• Use of uninitialized variables.
• Jumps into loops.
• Non-terminating loops.
• Incompatible assignments.
• Array indices out of bounds.
• Improper storage allocation and deallocation.
• Mismatch between actual and formal parameter in procedure calls. Use of incorrect logical
operators or incorrect precedence among operators.
• Improper modification of loop variables.
• Comparison of equality of floating-point values.
• Dangling reference caused when the referenced memory has not been allocated.
software documentation:
Testing:
Black Box Testing:
White Box Testing:
Debugging:
After a failure has been detected, it is necessary to first identify the program statement(s) that are
in error and are responsible for the failure, the error can then be fixed. In this Section, we shall summarise
the important approaches that are available to identify the error locations. Each of these approaches has
its own advantages and disadvantages and therefore each will be useful in appropriate circumstances. We
also provide some guidelines for effective debugging.
Debugging Approaches:
The following are some of the approaches that are popularly adopted by the programmers for debugging:
Brute force method:
This is the most common method of debugging but is the least efficient method. In this approach, print
statements are inserted throughout the program to print the intermediate values with the hope that some
of the printed values will help to identify the statement in error. This approach becomes more systematic
with the use of a symbolic debugger (also called a source code debugger), because values of different
variables can be easily checked and break points and watch points can be easily set to test the values of
variables effortlessly. Single stepping using a symbolic debugger is another form of this approach, where
the developer mentally computes the expected result after every source instruction and checks whether
the same is computed by single stepping through the program.
Backtracking:
This is also a fairly common approach. In this approach, starting from the statement at which an error
symptom has been observed, the source code is traced backwards until the error is discovered.
Unfortunately, as the number of source lines to be traced back increases, the number of potential
backward paths increases and may become unmanageably large for complex programs, limiting the use of
this approach.
Cause elimination method:
In this approach, once a failure is observed, the symptoms of the failure (i.e., certain variable is having a
negative value though it should be positive, etc.) are noted. Based on the failure symptoms, the causes
which could possibly have contributed to the symptom is developed and tests are conducted to eliminate
each. A related technique of identification of the error from the error symptom is the software fault tree
analysis.
Program slicing:
This technique is similar to back tracking. In the backtracking approach, one often has to examine a large
number of statements. However, the search space is reduced by defining slices. A slice of a program for a
particular variable and at a particular statement is the set of source lines preceding this statement that can
influence the value of that variable [Mund2002]. Program slicing makes use of the fact that an error in the
value of a variable can be caused by the statements on which it is data dependent.
Debugging Guidelines:
Debugging is often carried out by programmers based on their ingenuity and experience. The following are
some general guidelines for effective debugging:
Many times, debugging requires a thorough understanding of the program design. Trying to debug based
on a partial understanding of the program design may require an inordinate amount of effort to be put
into debugging even for simple problems.
Debugging may sometimes even require full redesign of the system. In such cases, a common mistakes
that novice programmers often make is attempting not to fix the error but its symptoms.
One must be beware of the possibility that an error correction may introduce new errors. Therefore after
every round of error-fixing, regression testing (see Section 10.13) must be carried out.
integration testing: Integration testing is carried out after all (or at least some of ) the modules have been
unit tested. Successful completion of unit testing, to a large extent, ensures that the unit (or module) as a
whole works satisfactorily. In this context, the objective of integration testing is to detect the errors at the
module interfaces (call parameters). For example, it is checked that no parameter mismatch occurs when
one module invokes the functionality of another module. Thus, the primary objective of integration testing
is to test the module interfaces, i.e., there are no errors in parameter passing, when one module invokes
the functionality of another module.
The objective of integration testing is to check whether the different modules of a program interface with
each other properly.
During integration testing, different modules of a system are integrated in a planned manner using an
integration plan. The integration plan specifies the steps and the order in which modules are combined to
realise the full system. After each integration step, the partially integrated system is tested.
An important factor that guides the integration plan is the module dependency graph.
We have already discussed in Chapter 6 that a structure chart (or module dependency graph) specifies the
order in which different modules call each other. Thus, by examining the structure chart, the integration
plan can be developed. Any one (or a mixture) of the following approaches can be used to develop the test
plan:
• Big-bang approach to integration testing
• Top-down approach to integration testing
• Bottom-up approach to integration testing
• Mixed (also called sandwiched ) approach to integration testing
In the following subsections, we provide an overview of these approaches to integration testing.
Big-bang approach to integration testing:
Big-bang testing is the most obvious approach to integration testing. In this approach, all the modules
making up a system are integrated in a single step. In simple words, all the unit tested modules of the
system are simply linked together and tested. However, this technique can meaningfully be used only for
very small systems. The main problem with this approach is that once a failure has been detected during
integration testing, it is very difficult to localise the error as the error may potentially lie in any of the
modules. Therefore, debugging errors reported during big-bang integration testing are very expensive to
fix. As a result, big-bang integration testing is almost never used for large programs.
Bottom-up approach to integration testing:
Large software products are often made up of several subsystems. A subsystem might consist of many
modules which communicate among each other through well-defined interfaces. In bottom-up integration
testing, first the modules for each subsystem are integrated. Thus, the subsystems can be integrated
separately and independently.
The primary purpose of carrying out the integration testing a subsystem is to test whether the interfaces
among various modules making up the subsystem work satisfactorily. The test cases must be carefully
chosen to exercise the interfaces in all possible manners.
In a pure bottom-up testing no stubs are required, and only test-drivers are required. Large software
systems normally require several levels of subsystem testing, lower-level subsystems are successively
combined to form higher-level subsystems. The principal advantage of bottom- up integration testing is
that several disjoint subsystems can be tested simultaneously. Another advantage of bottom-up testing is
that the low-level modules get tested thoroughly, since they are exercised in each integration step. Since
the low-level modules do I/O and other critical functions, testing the low-level modules thoroughly
increases the reliability of the system. A disadvantage of bottom-up testing is the complexity that occurs
when the system is made up of a large number of small subsystems that are at the same level. This
extreme case corresponds to the big-bang approach.
Top-down approach to integration testing:
Top-down integration testing starts with the root module in the structure chart and one or two
subordinate modules of the root module. After the top-level ‘skeleton’ has been tested, the modules that
are at the immediately lower layer of the ‘skeleton’ are combined with it and tested. Top-down integration
testing approach requires the use of program stubs to simulate the effect of lower-level routines that are
called by the routines under test. A pure top-down integration does not require any driver routines. An
advantage of top-down integration testing is that it requires writing only stubs, and stubs are simpler to
write compared to drivers. A disadvantage of the top-down integration testing approach is that in the
absence of lower-level routines, it becomes difficult to exercise the top-level routines in the desired
manner since the lower-level routines usually perform input/output (I/O) operations.
Mixed approach to integration testing:
The mixed (also called sandwiched ) integration testing follows a combination of top-down and bottom-up
testing approaches. In top down approach, testing can start only after the top-level modules have been
coded and unit tested. Similarly, bottom-up testing can start only after the bottom level modules are
ready. The mixed approach overcomes this shortcoming of the top-down and bottom-up approaches. In
the mixed testing approach, testing can start as and when modules become available after unit testing.
Therefore, this is one of the most commonly used integration testing approaches. In this approach, both
stubs and drivers are required to be designed.
Software reliability:
The reliability of a software product essentially denotes its trustworthiness or dependability.
Alternatively, the reliability of a software product can also be defined as the probability of the product
working “correctly” over a given period of time.
Removing errors from infrequently executed parts of software, makes little difference to the
reliability of the product. It has been experimentally observed by analysing the behaviour of a large
number of programs that 90 percent of the execution time of a typical program is spent in executing only
10 percent of the instructions in the program. The most used 10 percent instructions are often called the
core of a program. The rest 90 percent of the program statements are called non-core. It is clear that the
quantity by which the overall reliability of a program improves due to the correction of a single error
depends on how frequently the instruction having the error is executed. If an error is removed from an
instruction that is frequently executed (i.e., belonging to the core of the program), then this would show
up as a large improvement to the reliability figure. On the other hand, removing errors from parts of the
program that are rarely used, may not cause any appreciable change to the reliability of the product.
The main reasons that make software reliability more difficult to measure than hardware reliability:
• The reliability improvement due to fixing a single bug depends on where the bug is located in the
code.
• The perceived reliability of a software product is observer-dependent.
• The reliability of a product keeps changing as errors are detected and fixed.
Hardware versus Software Reliability:
• Hardware components fail mostly due to wear and tear, whereas software components fail due to
bugs.
• To fix a hardware fault, one has to either replace or repair the failed part, whereas a software product
would continue to fail until the error is tracked down and either the design or the code is changed to
fix the bug.
• change of reliability with time for a hardware component appears like a “bath tub”. For a software
component the failure rate is initially high, but decreases as the errors are corrected.
.
It is important to note that only run time is considered in the time measurements. That is, the time for
which the system is down to fix the error, the boot time, etc. are not taken into account in the time
measurements and the clock is stopped at these times.
Mean time to repair (MTTR): Once failure occurs, some time is required to fix the error. MTTR measures
the average time it takes to track the errors causing the failure and to fix them.
Mean time between failure (MTBF): The MTTF and MTTR metrics can be combined to get the MTBF
metric: MTBF=MTTF+MTTR. Thus, MTBF of 300 hours indicates that once a failure occurs, the next failure
is expected after 300 hours. In this case, the time measurements are real time and not the execution time
as in MTTF
Probability of failure on demand (POFOD): This metric does not explicitly involve time measurements.
POFOD measures the likelihood of the system failing when a service request is made. For example, a
POFOD of 0.001 would mean that 1 out of every 1000 service requests would result in a failure. Thus,
POFOD metric is very appropriate for software products that are not required to run continuously.
Availability: Availability of a system is a measure of how likely would the system be available for use over a
given period of time. This metric not only considers the number of failures occurring during a time interval,
but also takes into account the repair time (down time) of a system when a failure occurs. This metric is
important for systems such as telecommunication systems, and operating systems, and embedded
controllers, etc. which are supposed to be never down and where repair and restart time are significant
and loss of service during that time cannot be overlooked.
In order to estimate the reliability of a software product more accurately, it is necessary to classify
various types of failures. Please note that the different classes of failures may not be mutually exclusive.
A scheme of classification of failures is as follows:
Transient: Transient failures occur only for certain input values while invoking a function of the system.
Permanent: Permanent failures occur for all input values while invoking a function of the system.
Recoverable: When a recoverable failure occurs, the system can recover without having to shutdown and
restart the system (with or without operator intervention).
Unrecoverable: In unrecoverable failures, the system may need to be restarted.
Cosmetic: These classes of failures cause only minor irritations, and do not lead to incorrect results. An
example of a cosmetic failure is the situation where the mouse button has to be clicked twice instead of
once to invoke a given function through the graphical user interface.
Reliability Growth Modelling:
A reliability growth model can be used to predict when (or if at all) a particular level of reliability is
likely to be attained. Thus, reliability growth modelling can be used to determine when to stop testing to
attain a given reliability level.
Although several different reliability growth models have been proposed, we will discuss only two very
simple reliability growth models.
Jelinski and Moranda model:
The simplest reliability growth model is a step function model where it is assumed that the reliability
increases by a constant increment each time an error is detected and repaired. However, this simple
model of reliability which implicitly assumes that all errors contribute equally to reliability growth, is highly
unrealistic since we already know that correction of different errors contribute differently to reliability
growth.
Statistical testing:
Statistical testing is a testing process whose objective is to determine the reliability of the product
rather than discovering errors. The test cases designed for statistical testing with an entirely different
objective from those of conventional testing. To carry out statistical testing, we need to first define the
operation profile of the product.
Operation profile: Different categories of users may use a software product for very different purposes.
For example, a librarian might use the Library Automation Software to create member records, delete
member records, add books to the library, etc., whereas a library member might use software to query
about the availability of a book, and to issue and return books. Formally, we can define the operation
profile of a software as the probability of a user selecting the different functionalities of the software. If we
denote the set of various functionalities offered by the software by {f i}, the operational profile would
associate with each function {fi} with the probability with which an average user would select {f i} as his
next function to use. Thus, we can think of the operation profile as assigning a probability value pi to each
functionality fi of the software.
Software quality metrics: Software quality metrics are a subset of software metrics that focus on the
quality aspects of the product, process, and project. These are more closely associated with process and
product metrics than with project metrics.
Software quality metrics can be further divided into three categories −
1. Product quality metrics
2. In-process quality metrics
3. Maintenance quality metrics
1.Product Quality Metrics
This metrics include the following −
• Mean Time to Failure
• Defect Density
• Customer Problems
• Customer Satisfaction
Mean Time to Failure
It is the time between failures. This metric is mostly used with safety critical systems such as the airline
traffic control systems, avionics, and weapons.
Defect Density
It measures the defects relative to the software size expressed as lines of code or function point, etc. i.e., it
measures code quality per unit. This metric is used in many commercial software systems.
Customer Problems
It measures the problems that customers encounter when using the product. It contains the customer’s
perspective towards the problem space of the software, which includes the non-defect oriented problems
together with the defect problems.
The problems metric is usually expressed in terms of Problems per User-Month (PUM).
PUM = Total Problems that customers reported (true defect and non-defect oriented
problems) for a time period + Total number of license months of the software during
the period
Where,
Number of license-month of the software = Number of install license of the software ×
Number of months in the calculation period
PUM is usually calculated for each month after the software is released to the market, and also for
monthly averages by year.
Customer Satisfaction
Customer satisfaction is often measured by customer survey data through the five-point scale −
• Very satisfied
• Satisfied
• Neutral
• Dissatisfied
• Very dissatisfied
Satisfaction with the overall quality of the product and its specific dimensions is usually obtained through
various methods of customer surveys. Based on the five-point-scale data, several metrics with slight
variations can be constructed and used, depending on the purpose of analysis. For example −
Percent of completely satisfied customers
Percent of satisfied customers
Percent of dis-satisfied customers
Percent of non-satisfied customers
Usually, this percent satisfaction is used.
2.In-process Quality Metrics
In-process quality metrics deals with the tracking of defect arrival during formal machine testing for some
organizations. This metric includes −
• Defect density during machine testing
• Defect arrival pattern during machine testing
• Phase-based defect removal pattern
• Defect removal effectiveness
Defect density during machine testing
Defect rate during formal machine testing (testing after code is integrated into the system library) is
correlated with the defect rate in the field. Higher defect rates found during testing is an indicator that the
software has experienced higher error injection during its development process, unless the higher testing
defect rate is due to an extraordinary testing effort.
This simple metric of defects per KLOC or function point is a good indicator of quality, while the software is
still being tested. It is especially useful to monitor subsequent releases of a product in the same
development organization.
Defect arrival pattern during machine testing
The overall defect density during testing will provide only the summary of the defects. The pattern of
defect arrivals gives more information about different quality levels in the field. It includes the following −
The defect arrivals or defects reported during the testing phase by time interval (e.g., week). Here all of
which will not be valid defects.
The pattern of valid defect arrivals when problem determination is done on the reported problems. This is
the true defect pattern.
The pattern of defect backlog overtime. This metric is needed because development organizations cannot
investigate and fix all the reported problems immediately. This is a workload statement as well as a quality
statement. If the defect backlog is large at the end of the development cycle and a lot of fixes have yet to
be integrated into the system, the stability of the system (hence its quality) will be affected. Retesting
(regression test) is needed to ensure that targeted product quality levels are reached.
Phase-based defect removal pattern
This is an extension of the defect density metric during testing. In addition to testing, it tracks the defects
at all phases of the development cycle, including the design reviews, code inspections, and formal
verifications before testing.
Because a large percentage of programming defects is related to design problems, conducting formal
reviews, or functional verifications to enhance the defect removal capability of the process at the front-
end reduces error in the software. The pattern of phase-based defect removal reflects the overall defect
removal ability of the development process.
With regard to the metrics for the design and coding phases, in addition to defect rates, many
development organizations use metrics such as inspection coverage and inspection effort for in-process
quality management.
Defect removal effectiveness
It can be defined as follows −
DRE=DefectremovedduringadevelopmentphaseDefectslatentintheproduct×100%DRE=Defectremovedduri
ngadevelopmentphaseDefectslatentintheproduct×100%
This metric can be calculated for the entire development process, for the front-end before code
integration and for each phase. It is called early defect removal when used for the front-end and phase
effectiveness for specific phases. The higher the value of the metric, the more effective the development
process and the fewer the defects passed to the next phase or to the field. This metric is a key concept of
the defect removal model for software development.
3.Maintenance Quality Metrics
Although much cannot be done to alter the quality of the product during this phase, following are the fixes
that can be carried out to eliminate the defects as soon as possible with excellent fix quality.
• Fix backlog and backlog management index
• Fix response time and fix responsiveness
• Percent delinquent fixes
• Fix quality
Fix backlog and backlog management index
Fix backlog is related to the rate of defect arrivals and the rate at which fixes for reported problems
become available. It is a simple count of reported problems that remain at the end of each month or each
week. Using it in the format of a trend chart, this metric can provide meaningful information for managing
the maintenance process.
Backlog Management Index (BMI) is used to manage the backlog of open and unresolved problems.
BMI=NumberofproblemsclosedduringthemonthNumberofproblemsarrivedduringthemonth×100%BMI=Nu
mberofproblemsclosedduringthemonthNumberofproblemsarrivedduringthemonth×100%
If BMI is larger than 100, it means the backlog is reduced. If BMI is less than 100, then the backlog
increased.
Fix response time and fix responsiveness
The fix response time metric is usually calculated as the mean time of all problems from open to close.
Short fix response time leads to customer satisfaction.
The important elements of fix responsiveness are customer expectations, the agreed-to fix time, and the
ability to meet one's commitment to the customer.
Percent delinquent fixes
It is calculated as follows −
Fix Quality
Fix quality or the number of defective fixes is another important quality metric for the maintenance phase.
A fix is defective if it did not fix the reported problem, or if it fixed the original problem but injected a new
defect. For mission-critical software, defective fixes are detrimental to customer satisfaction. The metric of
percent defective fixes is the percentage of all fixes in a time interval that is defective.
A defective fix can be recorded in two ways: Record it in the month it was discovered or record it in the
month the fix was delivered. The first is a customer measure; the second is a process measure. The
difference between the two dates is the latent period of the defective fix.
Usually the longer the latency, the more will be the customers that get affected. If the number of defects
is large, then the small value of the percentage metric will show an optimistic picture. The quality goal for
the maintenance process, of course, is zero defective fixes without delinquency.
CASE and its scope: CASE stands for Computer Aided Software Engineering. It means, development and
maintenance of software projects with help of various automated software tools.
CASE environment:
CASE support in software life cycle:
Characteristics of software maintenance:
Software reverse engineering:
Software maintenance processes model:
Estimation maintenance cost:
Basic issues in any reuse program:
Reuse approach:
Reuse at organization level: