Unit 123 Oose
Unit 123 Oose
Preface xi
1. Introduction 1–31
1.1 What is Software Engineering? 2
1.1.1 Program vs. Software 3
1.1.2 Characteristics of Software 3
1.2 What is Object Orientation? 6
1.2.1 Classes and Objects 6
1.2.2 Messages, Attributes and Methods 8
1.2.3 Encapsulation 8
1.2.4 Inheritance 11
1.2.5 Polymorphism 13
1.2.6 Responsibility and Abstraction 15
1.2.7 Object Composition 15
1.3 Object-Oriented Methodologies 16
1.3.1 Coad and Yourdon Methodology 16
1.3.2 Booch Methodology 17
1.3.3 Rumbaugh Methodology 19
1.3.4 Jacobson Methodology 19
1.4 Object-Oriented Modelling 20
1.5 Some Terminologies 20
1.5.1 Customers, Developers and Users 21
1.5.2 Product and Process 21
1.5.3 Actor, Use Case, Use Case Model and Use Case Scenario 21
1.5.4 System and Subsystems 21
1.5.5 Class, Responsibility and Collaboration 22
1.5.6 Measures, Metrics and Measurement 22
1.5.7 Software Quality and Reliability 22
iii
iv Contents
Appendix 435–467
References 469–472
Answers to Multiple Choice Questions 473–474
Index 475–479
Preface
The complexity, criticality and size of the software is increasing every day, and resulting in
a situation where the traditional approaches to software development may not be effectively
applicable. In the traditional approaches, there is a difficulty to produce reusable and low-cost
maintainable software. The popular approach to address such situations can be addressed using
object-oriented paradigm. Hence, the software industry is shifting towards development of
software using object-oriented concepts and practices at each phase of software development,
and object-oriented software engineering has emerged as a separate and important discipline.
Object-oriented software engineering emphasizes visual modelling based on real-world objects
and entities. Modelling helps in understanding the problems, developing proper documents and
producing well-designed programs. Modelling produces well-understood requirements, robust
designs, and high-quality and maintainable systems. The models must depict the various views
of the system and these models must be verified to check whether they capture the customer’s
requirements. In this book, we have used Unified Modelling Language (UML) notations for
constructing various models at various stages of object-oriented software development.
The worldwide universities and software industries have started realizing the importance of
object-oriented software engineering. Most of the universities are now offering a full course on
object-oriented software engineering for their undergraduate and postgraduate students in the
disciplines of computer science and engineering, software engineering, computer applications,
and information technology.
The book focuses on object-oriented software engineering in the context of an overall effort
to present object-oriented concepts, techniques and models that can be applied in software
estimation, analysis, design, testing and quality improvement. This book is designed for use as a
main textbook for a course in object-oriented software engineering and object-oriented analysis
and design, and as a useful resource for academicians and software practitioners.
The book is the result of our several years of experience of classroom teaching. It consists
of numerous solved examples, chapter-end review questions, multiple choice questions and case
studies. The concepts and the models explained and developed in this book are demonstrated
using a real-life case study of library management system (LMS).
xi
xii Preface
Yogesh Singh
Ruchika Malhotra
1
Introduction
The world has seen many inventions and discoveries in the last 250 years. Which one has affected
our civilization the most? Electricity may be the answer. It has become the reason for many
applications and comforts. After electricity, what is next? It may be computer and software.
Numerous applications are developed and more and more are in the line to change our way of
life. Social networking websites like Facebook, Twitter, etc., research scholar platforms like
Google Scholar, and email service providing websites like Hotmail, Gmail, Rediffmail, etc. are
adding various dimensions to our life. We cannot think of a day without using Internet, without
using cell phone, without using laptop for various activities, etc. Software is a driving force for
such applications. We may see a large number of software applications with more features and
versatility in coming times.
The size and complexity of software are increasing day by day. Conventional approaches
of software design and implementation may not be effectively applicable. To handle a large
size software development project, we may require different approaches, skill sets, tools and
mindsets. We have seen this in civil engineering where constructing a house in a 250 m2
plot requires different approaches and tools than constructing a 50-storeyed building. House
and multi-storeyed building constructions are handled differently by the architects, structural
engineers and civil contractors. The same analogy is valid for software development where
a large size software project requires more thorough and systematic approaches. We want to
simplify the development process and produce high-quality maintainable software. As we all
know, development may take a few years and the same may have to be maintained for many
years. A maintainable software may reduce the maintenance cost and high quality may enhance
the sustainability of the software.
The necessity of developing and maintaining a large size, complex and varied functionalities
software system has forced us to look for new approaches of software design and development.
The conventional approaches like “waterfall model” may not be very useful due to non-availability
of iterations, no provision of reuse and difficulty in incorporating changing requirements. We
1
2 Object-Oriented Software Engineering
may also build every software system from the scratch that results into a costly software system
including very high maintenance cost. An object-oriented paradigm may address such issues. It
is becoming popular to design, develop and maintain large size, complex and critical software
systems using the object-oriented paradigm. Due to its popularity and acceptability in customers,
companies are also releasing the object-oriented versions of their existing software products.
Many of the customers expect object-oriented software solutions and request the same for their
forthcoming projects.
In this chapter, a framework of object-oriented software engineering is given. The object-
oriented concepts are introduced and explained. The object-oriented methodologies are discussed
and key terms are defined.
We may produce many documents during software development. These documents are
used not only during software development but also for maintaining the software. Some of the
documents are given as:
(i) Software requirements and specification document
(ii) Software design document
(iii) Test plan document
(iv) Test suite document
(v) Source code
Operating procedure manuals are prepared to help the customer to install, operate and maintain
the software. They are delivered along with program(s) at the time of release. Some of the
operating procedure manuals are given as:
(i) Installation manual
(ii) System administration manual
(iii) Beginner’s guide tutorial
(iv) System overview
(v) Reference guide
to work in the same way after many years for the same set of inputs and environment. Some of
the important characteristics of software are discussed here.
In the initial phase (burn-in phase), the failure rate is high. When we start testing the product,
we detect faults. These faults are corrected which results into a drop in the failure rate. However,
the drop may stabilize after certain time of testing and the curve becomes stable. This is the end
of initial phase (burn-in phase) which is expected to be performed in the company itself. Hence,
after the completion, the product is released to the customer. The second phase where the failure
rate is more or less constant is called useful life of any product. After the completion of the
useful life phase, the failure rate again increases due to the effects of environmental conditions
(like temperature, humidity, pressure, etc.), rains dusts and rusting on various parts of product.
This means, various parts begin to wear out. This phase is called wear-out phase.
We do not have the wear-out phase in software. The curve for software is shown in
Figure 1.3.
As the testing progresses, many failures are experienced and the required corrective actions
are performed to remove faults. Hence, the software becomes reliable over time instead of wearing
out. It may become obsolete due to other reasons but not because of wear-out. Some of such
reasons are change in technologies, change in expectations, poor response time, deterioration in
the structure of the source code, complexity issues, etc.
Introduction 5
Flexibility of Software
Flexibility of software may create confusion in stakeholders. They may feel that this unique
characteristic is a real strength of a software product in terms of making changes, incorporating
new functionalities, modifying source code and managing complexity. This confusion has
enhanced the expectation of stakeholders and propagated the theory of “any change possible at
any time without much difficulty”. A stakeholder is a person who is having direct or indirect
interest in the software system, including customers, software developers, managers, users,
testers and so on. As we all know, it is easy to modify the source code but it is very difficult to
manage the effect of changes in other parts of the source code. Addition of new functionality
at later stages always makes the life difficult for software developers. Many times, developers
may make compromises in terms of quality to accommodate the requests of changes. However,
making changes in software is easier as compared to hardware and such changes must be made
after proper study and analysis of its impact on other parts of the source code.
Reusability of Software
The concept of reusability of components is used in almost all disciplines of engineering. If
we have to manufacture a computer under a brand name of our company, we may purchase
monitor, keyboard, motherboard, microprocessor, switched-mode power supply (SMPS), etc.
from the market. We may also manufacture a few components, say cabinet, mouse, UPS, few I/O
cards, universal serial port, etc. in our company. Finally, we integrate all the components as per
specified design and guidelines, and test the product as per the testing standards. The product is
then released to the market under the brand name of the respective manufacturing companies.
We do not manufacture every component in the company. We purchase those components from
the market (like motherboard, UPS, SMPS, etc.) and reuse those components for manufacturing
of computers. The reusable components are very common and popular in practice and also
reduce the time and cost of manufacturing although maintaining the quality standards.
6 Object-Oriented Software Engineering
In software companies, most of the projects are developed for specific customers. Every
customer has unique requirements and expectations. The concept of reusability is rarely used
and that has resulted into the development of costly software with prolonged development
time. Reusability is the process of integrating the already built well-tested components in the
new software under development. By reusing the existing source code, the development effort
and cost of development and testing are reduced. Some attempts have been made in terms of
Microsoft Foundation Classes (MFC), Commercially off-the-shelf (COTS) components with a
very limited applicability. More effort is required to standardize the design principles, guidelines
and interfaces of COTS components. Reusability has introduced an emerging area of study
and that is known as “component-based-software-engineering (CBSE)”. Many popular COTS
components use the concept of object-oriented analysis and design to make it an independent
piece of software which can easily be plugged into other software to make an effective, reliable
and efficient software for its customers. The object-oriented concepts may fulfil the long-standing
desire of software engineering to produce libraries of standard software components which can
easily be integrated in order to produce a good quality product in time and within budget. It is a
very powerful and significant concept of object-oriented paradigm.
A class represents a group of similar objects. There are three parts of a class as shown in
Figure 1.4. The first part consists of the name of the class, the second part consists of all the
attributes (or information) and the third part has all the operations (or behaviour). The source
code of book class is also shown in Figure 1.4. The access specifiers (private and public) are used
to specify the visibility of data and operations to the other objects. The private data/operations
will not be available to the outside world. Only the operations of the class can access this data,
whereas public data/operations are available to other classes. In class book, the data is declared
as private and the operations are declared as public. This supports the concept of data hiding.
The book class provides controlled access to its data attributes. In C++, three access specifiers—
private, public and protected—are used. If no access specifier is specified, then by default all the
members of the class are private.
A class has a name, list of attributes and operations. Jacobson et al. (1999) have defined a
class as:
A class represents a template for several objects and describes how these objects are structured
internally. Objects of the same class have the same definition both for their operations and for
their information structures.
In the object-oriented system, every object belongs to a class and is known as instance of
that class. An object is also defined by Jacobson et al. (1999) as:
8 Object-Oriented Software Engineering
An instance is an object created from a class. The class describes the (behaviour and information)
structure of the instance, while the current state of the instance is defined by the operations
performed on the instance.
For example, a book class may have many objects like software engineering book, software
testing book, software quality book, etc. as shown in Figure 1.5. As shown in C++ implementation
in Figure 1.5, the objects can be created in the same way as the variables are declared. For
example, the variables are declared as:
int x;
char str;
The objects can be declared as:
Book SE;
Each object has its own copy of attributes and operations as shown in Figure 1.5.
1.2.3 Encapsulation
Encapsulation is also known as information hiding concept. The data and operations are
combined into a single unit. The only way to access data is through operations which are
designed to operate on the data. The data is not available to the external world. This concept
may make the data safe and secure from external interventions. Accidental modifications from
the outside world are not possible as shown in Figure 1.7. If the data of any object is required
to be modified, it is possible through the specified functions. This process of encapsulating the
Introduction 9
data and operations into a single unit simplifies the activities of writing, modifying, debugging
and maintaining the program.
The availability of data only for specified operations limits the scope of data and this may
help us to minimize the impact of any change in the program. In the class book of library
management system, all the attributes are private and only the operations can access the attributes
(see Figure 1.4). The private attributes are not accessible to the outside world. Thus, the private
10 Object-Oriented Software Engineering
part in the implementation is hidden from the users. The outside world can only interact with the
class book through public interfaces, i.e. the operations. If we need to interact with the operation
addbook( ) the following syntax is used:
Book b1;
b1. addbook( );
The encapsulation concept enhances the security and makes the program more maintainable and
sustainable.
Introduction 11
1.2.4 Inheritance
Inheritance is a very important feature of object-oriented systems. When we define a class,
we may find common attributes and operations amongst the classes. In a library management
system, we may define classes like student, faculty and employee. All these classes have many
common attributes (say memberID, name, date of birth, phone, email, etc.) and operations (say
addmember(), deletemember()). The common characteristics can be extracted and a new class
“member” may be created with common attributes and operations. The member class contains
attributes and operations which are common to all three classes, namely, student, faculty and
employee as shown in Figure 1.8.
Figure 1.8 Member class with three subclasses student, faculty and employee.
The member class is called the base class and other classes are called subclasses. The
subclasses inherit the attributes and operations of the base class and have their own behaviour.
Every subclass may have specific attributes (like rollno and school in the case of student base
class) and operations which are not available to other subclasses of the same base class. This
type of specialization–generalization relationship is known as ‘is-a’ relationship. The C++
implementation is given in Figure 1.9.
12 Object-Oriented Software Engineering
class Member
{
private:
long int memberID;
char photograph [300];
char name[50];
char fname [50];
Date DOB;
long int phone;
char email [60];
Date memberdate;
Date validupto;
public:
addmember();
deletemember();
updatemember();
viewmember();
};
All the attributes and operations of a base class become the part of its subclasses and we
may say that a subclass inherits the base class. If any change is made in the base class, that
will be equally applicable to all its subclasses. Inheritance property also helps to remove the
redundant information from the classes. This may reduce the size of the classes and they may
become easier to understand. In Figure 1.8, the class student inherits the class member and the
class student is called the derived the class and class member is called the base class. Inheritance
allows the developer to reuse a class and also modify the classes as per requirements with
minimizing their side effects into the rest of the class.
Introduction 13
1.2.5 Polymorphism
The dictionary meaning of polymorphism is “many forms”. If we give an instruction to many
objects across classes, the objects’ responses may be different. For example, human, animal, bird,
etc. are subclasses of mammal class. When we give an instruction “come fast” to all mammals,
their responses will be different. Animals may run, birds may fly and humans may walk or take
an automobile in response to the given instruction. This concept is called polymorphism, where
the same instruction is given to many objects across the classes, but responses of objects may be
different. Objects interact with each other by sending messages. A sending object may not know
the class of a receiving object. Jacobson et al. (1999) have rightly said that:
Polymorphism means that the sender of a stimulus (message) does not need to know the receiving
instance’s class. The receiving instance can belong to an arbitrary class.
Polymorphism can be achieved through function overriding. For example, consider the
media class with two operations read and show. The publication media need to read and display
different attributes such as the number of pages and publisher, whereas videotapes also need
to read and display different attributes such as time. Thus, the class publication and the class
videotapes override the operations read and show of the base class media and provide their own
read and show operations. Function overriding involves replacement of the same operation in
the base class with the one in the derived class. An object of the derived class refers to its own
function if the same function is defined in its base class. The example is shown in Figure 1.10
and its C++ implementation is given in Figure 1.11.
The read and show operations in media class are overridden by the operations in publication
and videotapes derived class. The read and show operations in the publication class read and
display their own specific attribute pages and pub in addition to the attributes in the base class.
Similarly, read and show operations in the videotapes class read and display their own specific
attribute time in addition to the attributes in the base class media. Thus, the same message is
sent to the media classes, and their behaviour is different depending upon which subclass of
media is used.
14 Object-Oriented Software Engineering
class media
{
private:
char title[MAX];
float price;
public:
void read()
{
cout<<”\n\tEnter title:”;
cin>>title;
cout<<”\n\n\tEnter price:”;
cin>>price;
}
virtual void show()
{
cout<<”\n\n\tTitle: ”<<title;
cout<<”\n\n\tPrice: ”<<price;
}
};
class publication : public media //Class to display information about books
{
private:
int pages;
char pub[MAX];
public:
void read()
{
media::read();
cout<<”\n\n\tEnter publication: ”;
cin>>pub;
cout<<”\n\n\tEnter number of pages:”;
cin>>pages;
getch();
}
void show()
{
media::show();
cout<<”\n\n\tPublication: ”<<pub;
cout<<”\n\n\tPages:”<<pages;
}
};
class videotapes:public media //Class to display information about videotapes
{
private:
int time;
public:
void read()
{
media::read();
cout<<”\n\n\tEnter time in seconds”;
cin>>time;
}
void show()
{
media::show();
cout<<”\n\n\tTime: ”<<time;
}
};
Figure 1.11 C++ implementation of classes in Figure 1.10.
Introduction 15
When the object of the derived classes publication and videotapes will be created, the read
and show methods included in the derived classes will be called instead of the read and show
methods included in the base class media shown as follows:
publication p1;
p1.read(); //read method defined in publication class will be called instead of read
//method defined in media class
In the OOA methodology, there is no systematic way to identify classes and objects. The
interfaces are also not determined in this methodology.
Macro Process
It is a high-level process that describes the activities to be followed by the development team
throughout the life cycle as shown in Figure 1.14.
18 Object-Oriented Software Engineering
In the first phase, the requirements are established using context diagrams and prototypes.
The outcomes of this phase are core requirements of the system. The analysis process involves
requirement capturing and understanding. It involves “what of the system”. This phase consists
of construction of use cases, identification and prioritization of risks. The design phase focuses
on the construction of architecture of the system and involves:
Identifying horizontal layers
Mapping classes to subsystems
Release planning
Attaching risks identified in the analysis phase to releases
The evolutionary phase involves implementation of the system and each release adds to the
functionality of the system. The maintenance phase consists of post-deployment activities.
Micro Process
It is the lower level process. The following recursive steps are followed in OOD micro process:
1. Identification of classes and objects
2. Identification of semantics of classes and objects
3. Identification of relationship amongst classes and objects
4. Specification of interfaces and implementation of classes and objects
Identification of classes and objects involves finding of classes and objects at specific level
of abstraction. The second step identifies the semantics of the classes and objects by finding
the meaning of the classes and objects in terms of attributes and operations. It also involves
determining the use of an object by another object. Identification of relationship involves
the process of determining the interaction amongst the classes and objects. The relationships
identified include inheritance, uses and instance of. The last step involves specification
of interface amongst classes and objects and their implementation. It identifies data type of
attributes and signature of operations.
In this methodology, no formal notations for constructing visual diagrams are given.
Introduction 19
The requirement model focuses on capturing functionality of the system through use cases and
actors and determining the interfaces amongst the use cases. In the analysis model, an ideal model
is developed while not considering the implementation environment. It involves the identification
of interface objects, database-related objects (entity objects) and objects representing control
between interface and database-related objects (control objects). The objects are grouped into
subsystems. In the design model the objects identified in the analysis model, are refined to the
actual implementation environment. These objects are called blocks. These blocks are converted
into modules in the implementation model and finally the modules are integrated and tested in
the test model.
All the methods discussed above have their own advantages and disadvantages. The OOA
method lacks the design of interfaces and notations. The OOD method is stronger in design but
weaker in analysis of the system. The OMT method is stronger in analysis part but weaker in
design part. The Jacobson’s methodology is stronger in behavioural areas as compared to the
other areas (Quatrani, 2003).
1.5.3 Actor, Use Case, Use Case Model and Use Case Scenario
An actor represents the role of a user that interacts with the system. Some of the examples of
the actors used in “Library Management System” are administrator, data entry operator, student,
library staff and faculty.
A use case describes who (any user) does what (interaction) with the system, for what goal,
without considering the internal details of the system. A complete set of use cases explains the
various ways to use the system. The use case model depicts actors, use cases and the relationship
between them.
A use case scenario is an instance of a use case or a complete path through the use case. The
basic flow is one scenario and every alternative path gives another scenario.
For example, a measure is the number of failures experienced during testing. Measurement is
the way of recording such failures. A software metric may be an average number of failures
experienced per hour during testing.
Fenton and Pfleeger (2004) have defined measurement as:
It is the process by which numbers or symbols are assigned to attributes of entities in the real
world in such a way as to describe them according to clearly defined rules.
Review Questions
1. What is software engineering? What is the aim of software engineering?
2. Describe the characteristics of software. How are the characteristics of software different
from those of hardware?
3. Explain the difference between program and software. What is the importance of
producing documents and operating manuals in software development?
4. Software does not wear out. Comment.
5. Give the characteristics of an object-oriented system. What are the main advantages of
object-oriented software development?
6. Describe attributes and operations with respect to an object with relevant example.
7. (a) What is object orientation? How is it close to real-life situations? Explain the basic
concepts which help us to model a real-life situation.
(b) Describe the following terms:
(i) Messages
(ii) Methods
(iii) Responsibility
(iv) Abstraction
8. (a) How is object-oriented software development different from traditional software
development?
(b) Discuss the following terms:
(i) Object
(ii) Class
(iii) Message
(iv) Inheritance
(v) Polymorphism
9. What is modelling? Explain how modelling can play an important role in designing a
system.
10. Explain the requirement and analysis model in the Jacobson methodology.
11. Compare and contrast the object-oriented methodology of Booch, Rumbaugh and
Jacobson.
12. Explain the macro and micro process of the Booch methodology.
13. Mention the models in the analysis phase of the Rumbaugh methodology and explain
their roles for describing the system.
14. Explain the following:
(a) Object modelling technique
(b) Object composition with an example
15. Give a brief description of the characteristics of object-oriented modelling.
16. Explain object model, dynamic model and functional model.
26 Object-Oriented Software Engineering
Further Reading
A good number of concepts of software engineering are explained in the following books:
Pressman, R., Software Engineering: A Practitioner’s Approach. New York: Tata-McGraw-Hill,
2005.
Somerville, I., Software Engineering. Reading, MA: Addison-Wesley, 2004.
The object-oriented concepts are effectively addressed in:
Korson, T., and McGregor, J., Understanding object oriented: A unifying paradigm.
Communications of the ACM, 33(9), September 1990.
The basic concepts of object-oriented programming in a language-independent manner are
presented in:
Budd, T., An Introduction to Object-Oriented Programming. Pearson Education, India, 1997.
The definitions of object, class, inheritance and aggregation may be read from:
Berard, Edward V., Basic Object-Oriented Concepts, http://www.ipipan.gda.pl/~marek/objects/
TOA/oobasics/oobasics.html
The overview of object-oriented software engineering methodologies is presented in:
Jacobson, I.V. Object Oriented Software Engineering: A Use Case Driven Approach. New Delhi:
Pearson Education, 1999.
Some of the useful facts about software may be found in:
Glass, R.L., Facts and Fallacies of Software Engineering. Pearson Education, 2003.
The details about the methodologies described in this chapter can be obtained from:
Coad, P., and Yourdon, E., Object-Oriented Analysis, 2nd ed. Englewood Cliffs, NJ: Prentice-
Hall, 1990.
Jacobson, I.V., et al., Object Oriented Software Engineering. Pearson Education, 1999.
Booch, G., Object-Oriented Design with Applications. Redwood City, CA: Benjamin-Cummings,
1991.
Rumbaugh, J., Blaha, M., Premerlani, W., Eddy, F., and Lorensen, W., Object-Oriented Modelling
and Design. Englewood Cliffs, NJ: Prentice-Hall, 1990.
2
Software Development
Life Cycle Models
When we decide to develop a software product, many initial questions focusing on the need of
the software come into our mind, such as “Would it be better to electronically generate mark
sheets?,” or “Is there any market for the word processing system?,” or “Is it economically viable
if we electronically generate payroll of an employee?”. Once the needs are determined, the
software goes through a series of phases of development. These phases include analysis, design,
implementation, testing, maintenance and retirement. The software remains useful between the
analysis and maintenance phases and ends with the retirement phase. The period from which a
software development process starts till the retirement phase is known as life cycle of the software.
The life cycle period of one software differs from that of another. The software development
life cycle (SDLC) models depict the procedure used for development of the software in its life
cycle. A number of software development life cycle models are available in literature and are
based on the methods and techniques used for developing and maintaining the software. In
this chapter, we describe a variety of software development life cycle models. The three widely
used models are described which include waterfall model, prototyping model and iterative
enhancement model. We also present spiral model which has received attention in past few years.
In addition, an emerging model extreme programming is introduced. Finally, two object-oriented
software development models (fountain model and rational unified process model) are discussed.
In the next subsections, we describe six popular conventional software development life
cycle models.
The build-and-fix model may work well on small programs of approximately 50–200 lines
of source code, but it is not suitable for reasonable sized programs. The cost of correcting defects
increases exponentially if the defect is detected in the later phases of software development.
Hence, the cost of fixing defects of the program developed using build-and-fix model is higher
34 Object-Oriented Software Engineering
as compared to the cost of defect correction in any program which is developed using any
other specified software development life cycle model. The maintenance of the software also
becomes very difficult without any requirement or design documents. In addition, the source
code is modified a number of times using ad hoc build-and-fix approach which makes the
source code poorly structured and unenhancable after some period of time. Many a time even
a well-developed program does not match the customer’s requirements and thus is not useful
for the customer. This necessitates the need of effective requirement analysis phase before the
development of the source code. Hence, a mature approach must be followed and a life cycle
model with pre-defined phases such as requirement analysis, design, implementation, testing,
and maintenance must be selected.
One of the disadvantages of the waterfall model is overcome by building prototypes to determine
the customer’s needs. The prototyping model is described next.
A throwaway prototype is developed which undergoes design, coding and testing but these
phases are not carried out thoroughly and rigorously. The throwaway prototype is discarded
once the requirements are determined and the final system is developed from the scratch. This
prototype is generally built quickly to give the customer the feel of the system.
During the requirement analysis phase a “quick and dirty” prototype is constructed and
given to the customer to obtain feedback in order to determine the necessary and correct
requirements. The user interfaces are also validated. After obtaining the customer feedback,
Software Development Life Cycle Models 37
the prototype is refined until the requirements are stabilized/finalized. After the requirements
have been determined, the prototype is thrown away. The final SRS document is prepared which
serves as input to the next phase similar to that of the waterfall model.
The advantages of the prototyping model are as follows:
1. Stable requirements: Requirements are stabilized by refining the prototype again
and again based on the customer’s feedback. Thus, the probability of change in the
requirements after developing the final SRS will be minimized.
2. High-quality system: The quality of the system will be high as the developers and
customers have gained a lot of experience while constructing the prototype.
3. Low cost: The cost of the actual system will be reduced.
The disadvantages of the prototyping model are that the customer may expect quick delivery of
the software, and the time for development may exceed in some cases.
In the iterative enhancement model, the later software increments may require modifications
in earlier ones which may increase costs.
the performance, development and interface-related risks are resolved, the waterfall approach
is followed incrementally in the next steps which includes concept of operations, software
requirements, software design, implementation and testing. Each level incorporates validation of
the activities by conducting reviews and preparing various plans for the next cycle.
The spiral model repeats the four phases to the following rounds as shown in Figure 2.6:
Round 0: Feasibility study
As recommended by Boehm (1986), the initial round 0 must be carried out in order to determine
the feasibility of the system in terms of resources, cost, schedule and productivity.
Round 1: Concept of operation
The output of this round is a basic requirement of the life cycle plan for the implementation of
the concepts emerged till now.
Round 2: Top-level requirements analysis
In this round, the requirements are specified and validated following the risk-driven approach.
The output produced is the development plan.
Round 3: Software design
A preliminary design is created, verified and validated. Integration and test plan is produced
after the completion of round 3.
40 Object-Oriented Software Engineering
The features of XP include simple processes, continuous feedback, incremental growth, high
communication and courage. For this, the customer (a domain expert) is available at all the
times. This reduces the feedback time greatly as the solution to a problem is obtained in a
very short time (few minutes to few hours). The software is developed iteratively and the self-
organizing teams adapt to the changes in the methodologies easily. A typical life cycle of an XP
is shown in Figure 2.8 and the phases are discussed as follows:
1. User stories: XP begins with collection of requirements termed “user stories” from
the customer. These stories are short and written by the customer(s). User stories differ
with traditional requirement specification in the sense that they only provide details
for making an estimate of how much time it will take to implement a user story. The
detailed requirements are collected at the time of development from the customer. These
stories are used in release planning and to create acceptance test plans and test cases
(Figure 2.9).
2. Release planning: In this phase, the developers estimate the time to implement the user
stories and the customer selects the order in which the stories will be implemented. In
42 Object-Oriented Software Engineering
this phase, the developer may do a quick exploration (spike) of a user story in order to
estimate its cost. The customer may also divide a user story into substories, when and
where required. The steps followed in release planning are shown in Figure 2.10. The
release date of each story is finalized. Finally, the customer sorts and extracts the high
ranked and high-risk stories.
The object-oriented software development life cycle includes the following phases:
1. Object-oriented requirement analysis: In this phase, the use case approach is used for
capturing requirements from the customer. The SRS document containing the use case
description may be produced during this phase.
2. Object-oriented analysis: In this phase, the objects and the interrelationships between
these objects are identified. The functions of the objects are determined. An ideal
structure is created in order to build high-quality maintainable software.
3. Object-oriented design: In this phase, the objects are defined in detail keeping in mind
the implementation environment. All the objects identified during the object-oriented
analysis phase must be traced to the design phase.
4. Object-oriented programming and testing: The objects, the functions encapsulated
in these objects and interactions amongst the objects are implemented in terms of
source code. The existing developed and well-tested components may be used and
new components are created. This feature supports reusability of the source code. The
developed components are tested using object-oriented testing techniques.
A typical object-oriented life cycle model is depicted in Figure 2.11.
Changes can be easily made between class specification and requirement specification.
Thus, there is no need to freeze the requirements in the early phases of software development.
Since the system is developed in terms of classes, the phases of the software development life
cycle can be applied to individual classes rather than system as a whole (Henderson-Sellers and
Edwards, 1990).
The fountain model may follow an undisciplined approach in which the developer moves
randomly between phases.
6. Change control and management: The RUP provides guidelines for managing, controlling
and tracking changes in order to enable effective iterative software development.
7. Automated testing: The RUP promotes the use of automated testing. The automated
testing does repetitive testing, unattended without any human intervention. Both
functional and non-functional requirements can be tested by using a tool. This saves
much of the effort, time and resources.
RUP Overview
The process can be divided into two structures:
1. Static structure: It provides the process description in terms of roles, activities,
artifacts, disciplines and workflows.
2. Dynamic structure: The dynamic aspect of the process can be viewed in terms of
iterative development.
The structure of an RUP is shown in Figure 2.15. The vertical dimension depicts the static
structure of the process and the time dimension depicts the dynamic structure of the
process Each activity on the time dimension is carried out iteratively. As it can be seen
from Figure 2.15, implementation is started much later in the software development. Most
of the requirements are predefined in the early phases, but some new requirements may
be added in the later stages of software development. Testing is carried out throughout
the software life cycle whereas deployment activities begin much later in the software
development. Although the focus on activities keeps on increasing and decreasing throughout
the software life cycle, they can be carried out at any time during the software life cycle.
Roles: A role describes functions or position that a person is expected to have in a project. The
functions are known as activities that a person has to perform in order to achieve an artifact.
A person may have many roles. For example, as shown in Figure 2.17, Rita plays the role of a
designer and a use case creator simultaneously. The role of the person may keep on changing
depending on the project. For example, Ram may be a project manager at one time and a design
reviewer at the other time.
The roles of four persons involved in an example application are shown in Figure 2.17.
In the figure, each role is associated with the corresponding activities to be performed by the
role player. For example, Mary is a designer and is responsible for creating class design and
identification of attributes and functions of a class.
Activities: Activities are the work performed by a person in a specific role to produce the
required result from the system. Activity is expressed in terms of creation or design of an artifact
such as use case, object, state chart, etc. The following are examples of activities performed by
persons in different roles:
1. Estimation of effort and schedule
2. Design of classes
3. Review of SRS document
4. Verification of quality of system design
5. Creation of test plan and test cases
50 Object-Oriented Software Engineering
An activity may be further decomposed into various subactivities. For example, design of a class
may be decomposed into the following steps:
1. Identification of attributes
2. Identification of functions
3. Identification of interaction amongst functions
4. Description of functions
5. Description of relationship of a class with other classes in the class model
6. Evaluation of the relationship amongst classes
7. Development of a description of the class
8. Review of the results
Artifacts: Artifacts are the outputs produced during the development life cycle of the software.
They may be end products produced or inputs used by the activities while developing the software.
An activity is performed by a role to produce an artifact. The following are the examples of
artifacts:
1. Software requirement specification
2. Use case model
3. Class model
4. Test plan
5. Source code
6. User manual
Software Development Life Cycle Models 51
Disciplines: Disciplines are used to organize a set of activities. An RUP consists of six major
disciplines: business modelling, requirements, analysis and design, implementation, testing and
deployment. These disciplines are traced again and again throughout the software development
life cycle.
Workflows: Workflows consist of a series of activities to produce a relevant output.
Dynamic structure of RUP: The dynamic structure of an RUP is organized along time as
shown in Figure 2.18. It consists of four phases as shown in the figure: inception, elaboration,
construction and transition. Each phase achieves a predefined milestone that ascertains the status
of the project.
The distribution of effort and schedule is different in all the phases and is shown graphically
for a medium-sized project in Figure 2.19.
The RUP follows an iterative development process as shown in Figure 2.20. The first pass
through inception, elaboration, construction and transition produces the first version of the
software. The user feedback is obtained along with defect reports and improvement needs. The
same process is repeated to evolve the next generation of the software.
52 Object-Oriented Software Engineering
Inception: The inception phase begins with the following questions: How long would it take to
complete the project? How feasible is the project? What are the high-level requirements? In the
inception phase, business problem is defined, an actors (external entities that interact with the
system) and use cases are identified. The significant use cases are described.
Inception is basically a non-iterative process as compared to the other phases which are
highly iterative. An iteration plan is developed that describes during which iteration which use
case will be implemented. The essential activities of the inception phase are as follows:
1. Establishment of scope and boundary of the project.
2. Determination of cost and schedule of the project.
3. Identification of actors and use cases.
4. Development of initial iteration plan.
5. Determination of high-level risks.
The artifacts produced by the inception phase are shown in Figure 2.21. The vision document
addresses the scope and requirements of the project. The main constraints of the project are also
identified. Business case is defined and an initial list of risks involved in the project is prepared.
The objectives and durations of the initial phases are determined in software development plan.
The iteration plan consists of details of which use case to be covered during which iteration. The
required tools in the project are listed. An initial glossary consisting of definitions of important
terms is prepared. The initial use case model identifies important actors and use cases along
with flow of events for significant use cases. The environment for configuration management is
set up by establishment of project repository. Prototypes are very useful for the understanding of
the project (optional artifacts).
Software Development Life Cycle Models 53
Elaboration: The elaboration phase consists of planning and architectural design. This is the
most critical phase of RUP. As given in the iteration phase, the elaboration phase is followed
for each use case in the current iteration. In this phase, detailed description of use cases is
prepared. The requirements gathered in the form of use cases are documented in the software
requirement specification document. The other activities of the elaboration phase include review
of use case model and SRS document for the assessment of quality. The essential activities of
the elaboration phase are as follows:
1. Establishment and validation of architectural baselines.
2. Addressing significant risks.
3. Design of use case model.
4. Selection of components and formation of policies for their purchase and usage.
5. Creation of detailed iteration plans.
6. Development of prototypes.
The outcomes of the elaboration phase are given in Figure 2.21. Executable architectural
prototypes are created to explore significant functionality of the system. Revised and updated
54 Object-Oriented Software Engineering
risk list is prepared which primarily handles non-functional requirements. Software architecture
description document includes description of use cases and design elements. The design model
and data model are also designed. The implementation model consists of initial structure and
identifies significant components. The detailed iteration plan for the construction phase is
prepared. A use case model (approximately 80% complete) is designed. All the use cases along
with actors are identified and described. Test plan includes test cases to validate the system. Test
automation architecture is also designed.
Construction: On the basis of architecture and design developed in the elaboration phase, the
product is developed and tested in the construction phase. During this phase, the remaining
requirements are determined. The deployable products are produced from this phase. The
essential activities of the construction phase are as follows:
1. Optimization of resources by avoiding rework and unnecessary coding.
2. Assessment and verification of quality.
3. Testing all the functionalities of the product. Testing activities include unit, integration
and system testing.
The outcome includes the software product along with the user manuals. A completed and
reviewed iteration plan is produced for the transition phase. A design model with new and
updated design elements is prepared. The test outline and test suite are also preserved as they
may be required during the maintenance phase.
Transition: The transition phase is started when a usable product with sufficient quality has
been built. The objective of this phase is to hand over the software product to the customer. This
phase includes delivering, training users and maintaining the software. Elaboration involves beta
releases, bug fixes and enhancement releases.
Product release produces the product that conforms to the customer’s requirements. The
outcome of the transition phase includes various reports and documents such as beta test reports,
release notes, training material and end-user support material.
The RUP is iterative in nature and thus has many advantages. It allows to develop flexible,
low-risk, reusable and maintainable software. Hence, a good quality software product is expected
to be produced from the RUP.
(Contd.)
56 Object-Oriented Software Engineering
Table 2.2 Summary of conventional and object-oriented software development life cycle
models (Contd.)
Model Applications Strengths Weaknesses
Extreme Small and medium-sized Creates software fast with few Hard to implement.
programming projects that require quick defects. Customers may not like to be
development. Less meetings. involved in every activity.
Works good for high-risk Emphasizes team work and Less challenging for
projects. communication. professionals.
Continuous measurement Lack of documentation.
reviews. Not suitable for larger projects.
Fountain Object-oriented projects. Overlapping phases. Undisciplined software
Short maintenance cycle. development approach may be
Can easily accommodate followed in which developer
changing requirements. moves randomly between
Supports reusability. phases.
Rational unified Object-oriented large- Complete methodology. Complex process.
process sized projects. Closer to real-world. Designers should be expert to
Support for visual modelling utilize this methodology.
using UML. Reuse not possible in the case
Test plans and test cases are of a project built using new
constructed directly from use technology.
cases in the early phases of
software development.
Supports reusability in the
form of use cases and design
of components. This helps
to improve the quality of
the system and also reduces
development time.
Can easily accommodate
changing requirements.
Reduced time and effort on
integration as it follow iterative
process.
Online training and tutorials
available.
Review Questions
1. Explain the build-and-fix model. What are the disadvantages of such a model?
2. What is software development life cycle? Discuss the waterfall model.
3. List the advantages and disadvantages of the waterfall model.
4. Explain the prototyping model. What is the effect of using prototyping model on the
overall cost of the software?
5. What is a throwaway prototype? List the advantages of the prototyping model.
Software Development Life Cycle Models 57
6. Discuss the iterative enhancement model with the help of a block diagram. In what
conditions is this type of model suitable?
7. Discuss the spiral model with the help of a neat diagram.
8. Compare waterfall model and prototyping model.
9. How is “risk factor” analysed and handled in the spiral model?
10. What are the limitations of the spiral model?
11. What is the significance of rounds in the spiral model?
12. What are agile processes? Explain their key features.
13. Discuss the life cycle of extreme programming. What are the limitations of such an
approach?
14. What steps are involved in release planning of the extreme programming approach?
What is the purpose of refactoring in extreme programming?
15. Differentiate between release planning and iteration planning.
16. List and explain the extreme programming rules.
17. What is pair programming? Explain its significance in extreme programming.
18. Define the following terms:
(a) Spike
(b) Agile process
(c) 80-20 rule
(d) Pair programming
(e) Refactoring
19. What is the role of a customer in the extreme programming model?
20. Differentiate between the conventional approach and the object-oriented approach of
software development.
21. Explain the fountain model with the help of a diagram. What is the significance of
arrows within circles in this model? List the advantages and disadvantages of this model.
22. What is RUP? Explain the various phases of RUP along with their outcomes.
23. Differentiate between the static structure and dynamic structure of RUP.
24. Establish the relationships between roles, activities and artifacts in RUP.
25. Discuss the parameters based on which we may select a software development life cycle
model.
Further Reading
The experiences and suggestions of Royce on the waterfall mode are written in:
Royce, W., Managing the development of large software systems. IEEE WESCON, August 1970.
The classic approach of iterative enhancement was proposed by Basili and can be further read in:
Basili, V. and Turner, A., Iterative enhancement: A practical technique for software development.
IEEE Transactions on Software Engineering, 1(4): 390–396, 1975.
The overview of object-oriented life cycle is given in:
Henderson-Sellers, B. and Edwards, J., Object-oriented systems life cycle. Communications of
the ACM, 33(9), September 1990.
An overview of agile processes may be obtained from:
Cockburn, A., Agile Software Development. Boston, MA: Addison-Wesley, 2000.
William explains XP with the perspective of programmer, customer and manager in his book:
Wake, W.C., Extreme Programming Explored. Boston, MA: Addison-Wesley, 2001.
Beck gives stories, methodology, myths and applications of XP in his book:
Beck, K., Extreme Programming Explained. Boston, MA: Addison-Wesley, 2004.
The details on rational unified process can be obtained from:
Rational Software, Rational Unified Process Version, 2002.
3
Software Requirements Elicitation
and Analysis
Whenever we get a request for software development from a customer, we would like to first
understand the project. This understanding may compel us to think about the feasibility of the
project. Some projects are very good conceptually, but may not be feasible due to limitations of
technology, time, cost, market or appropriate skilled manpower. The decision about feasibility
also depends upon our understanding of requirements. The non-feasibility of a project must
be realized as early as possible, otherwise cancellation of a project in later stages may lead to
embarrassment and huge wastage in terms of time, cost and manpower.
The key issue is the capturing of requirements. This is a very difficult and challenging phase
of software development life cycle. Most of the requirements are in the minds of the people and
extracting them is not an easy task for any developer. After extraction, such requirements should
be documented in a specified format. Brooks (1995) has rightly mentioned that:
The hardest part of building a software system is deciding precisely what to build. No other part
of conceptual work is as difficult as establishing the detailed technical requirements. No other
part of the work so cripples the resulting system if done wrong. No other part is more difficult
to rectify later.
So, if requirements are elicited properly and documented rightly, then it is presumed that
effective foundations of the project are laid. In this chapter, we present requirements elicitation
techniques. After the requirements are captured, the initial requirements document is prepared.
The use case approach widely being used in object-oriented software engineering is explained
and the characteristics of a good requirement are defined. Finally, the contents of the SRS
are explained. In order to explain the concepts, a case study of library management system is
considered throughout this book.
62
Software Requirements Elicitation and Analysis 63
2. Return of books
(a) Any person can return the issued books.
(b) If a book is returned after the due date, a fine is charged from the students for each day
delayed. The charges may vary from time to time. However, faculty and employees are
not charged any fine for late return of a book.
3. Maintenance of information
The LMS maintains the following information:
(a) Details of all members with their name, address, designation (wherever applicable),
phone number and unique identification code.
(b) Details of all books with their author name(s), publisher, price, number of copies, and
ISBN number.
(c) Details of books issued to every member.
the existing system may become the source of information, along with the people involved in
the system. A generic term is used for the people who are affected directly or indirectly by the
system that is being developed and is called stakeholders.
The objective of effective customer developer partnership is not easy to achieve. Both groups
have different mindsets, educational background, vocabulary, communication skills and domain
expertise. All such things lead to communication gap which further increases the probability of
conflicts, misunderstanding and ambiguities. However, both groups want success of the project.
There are many techniques for requirements elicitation. We may use one or more techniques to
capture the requirements. One technique may not be sufficient to capture enough details of the
expectations. The selection of a technique may be based on the following:
66 Object-Oriented Software Engineering
3.3.1 Interviews
The most popular, simple and conventional requirements elicitation technique is to conduct
interviews with the customer. After receiving the request for software development, we would
like to understand the project. Hence, we may like to meet the customer to discuss his/her
expectations from the project. The interview of the customer may be informal (non-structured) or
formal (structured). The first such meeting/interview may help to understand broad expectations.
In the informal interview, there is no fixed agenda and open discussions for free flow of view are
encouraged. For example, for an LMS described in Section 3.1, we may ask:
(i) Who is the librarian?
(ii) Why do you feel the requirement of library management system?
(iii) How many members are regular visitors?
(iv) What are the limitations of the present manual library system?
(v) How many types of memberships are offered?
(vi) Who is the most conversant with the present system?
(vii) Is there any opposition of the project?
(viii) How many persons of library staff are computer friendly?
These types of questions may become instrumental in the understanding of the present manual
system. In the structured interview, a proper agenda is prepared along with a questionnaire. The
various steps of structured interviews are given in Figure 3.1.
Selection of Stakeholders
There are many stakeholders of any system. All cannot be interviewed. The representatives from
a group of stakeholders may be selected on the basis of experience, qualification, intelligence,
domain knowledge, credibility, loyalty, etc. There are many groups like entry-level personnel,
mid-level personnel, managers, users of the software, top-level management, developers, quality
assurance personnel, related vendors, maintenance personnel, etc. Every group has different
view points and expectation from the proposed system. One or more persons from every group
should be selected and interviewed to understand and capture the requirements.
Section II
Please specify your name and role in this project: .......................................
S. No. Questions
1 Are you satisfied with the manual/present system?
2 What are the problems with the current system?
3 What are the strengths of the present system?
4 What are the limitations of the present system?
5 What are the possible benefits of automating the present system?
6 Are you satisfied with current processes and policies?
7 How are you maintaining the present records?
8 List a few important objectives of the proposed automation.
9 List a few problems which you want to resolve through automation.
10 List point-wise the scope of the project in order of priority.
11 Do you expect additional functionality to improve efficiency and performance
of the system?
(Contd.)
68 Object-Oriented Software Engineering
EXAMPLE 3.1 Consider the case study of LMS given in Section 3.1. Develop a questionnaire
containing a list of questions that may be distributed to the librarian before conducting an
interview.
Solution We may frame specific questions for a project. For example, the following questions
may be distributed to the librarian before conducting an interview. The questions that may
be discussed by the requirement analyst with the librarian during the interview are shown in
Table 3.2.
The questionnaire will discipline stakeholders and structure the interview process. All
points of the questionnaire will be discussed freely and the questionnaire will be analysed and
reviewed to improve the quality of the document.
Software Requirements Elicitation and Analysis 69
to make these ideas complete, if possible. Finally, an initial requirement document (IRD) is
prepared to document the requirements.
3.3.4 Prototyping
Prototyping is one of the expensive but powerful ways to capture requirements. A prototype is a
simplified version of the system. When it is shown to the customers, they get an idea about the
final system. At this point, their feedback and views are very important and may help us to read
their minds. We generally use prototype to understand the requirements. After finalization of the
requirements, the purpose of a prototype is over and it is discarded. Hence, we should use the
prototype and the final system should be built around the existing prototype. Prototyping is the
rapid development of a system for the purpose of understanding requirements. Customers and
users can use the prototype to see how the system will look and behave finally. This may reduce
the chances of misunderstanding between customers/users and developers. Missing expectations
may be highlighted and ambiguous areas may be discussed to make it unambiguous. Initially,
prototyping may cost us more but the overall development cost may be reduced. Developers
generally use this prototype to refine the requirements and prepare the final specification
document. Through prototyping, views of customers are easily incorporated in the IRD. In most
of the situations, the source code of the prototype is thrown away; however, experience and
feedback gathered from developing and using the prototype helps in developing the actual system.
Schach (1999) has rightly mentioned, “The developers should develop the prototype as early as
possible to speed up the software development process. After all, sole use of this is to determine
the customer’s real needs. Once this has been determined, the prototype is discarded. For this
reason, the internal structure of the prototype is not very important”. However, there are people
in some organizations who do not believe in this throwaway approach of prototyping. They feel
that the prototype provides foundations for the system and huge effort is already invested.
A use case describes who (any user) does what (interaction) with the system, for what goal,
without considering the internal details of the system. The use cases are written in a simple
language which should be understandable to every stakeholder. There is no standard outline for
a use case. However, a few templates are available in the literature. Requirements are captured
in a systematic way and discipline the requirement writers to follow a specified format.
74 Object-Oriented Software Engineering
An actor is someone or something that interacts with the system and lies outside the system.
The actor may be users of the system, customers, persons giving information to the system or
any external system providing data. All stakeholders on the customer’s site may be treated as
actors if they wish to interact with the system. Hence, everything that is outside the system and
wishes to interact with the system is known as an actor.
Extend Relationship
Extend relationship is used to model the occurrence of some optional, alternative or special part
of the use case. This relationship is used to extend the functionality of the original use cases.
The new use case is inserted into the original use case. The procedure when the extended use
case is inserted into the original is as follows:
1. The original use case executes in usual manner to the point where the new use case has
to be inserted.
2. At this point, the new use case is inserted and executed.
3. After the inserted use case completes, the original use case resumes again.
For example, in the LMS, the concept of extend can be observed when a student returns the
book after the due date. The fine is calculated for late return of the book. We can represent fine
calculation use case as a new use case that extends return book use case. The fine calculation
use case is called whenever the book is returned after the due date by the student. The example
of extend relationship for the LMS is shown in Figure 3.4.
76 Object-Oriented Software Engineering
Include Relationship
The redundant and repeated functionalities amongst use cases can be modelled into include
relationship. Thus, the redundancies can be grouped into a single use case. In order to use
include relationship, there must be common text in two or more use cases. As in the case of
extend relationship, the new use case is inserted into the original use case. The procedure when
the included use case is inserted into the original is the same as given in the extend relationship.
For example, in employee management system, print use case is required by three use cases—
salary generation, appraisal and generate reports (see Figure 3.5).
whole system. However, for a large system, we may have to draw many use case diagrams to
represent various portions of the system. The use case diagram of the LMS is given in Figure 3.7.
EXAMPLE 3.2 Consider the case study of the LMS given in Section 3.1. Give use case
description of return a book use case.
Solution The use case description of return book is given in Table 3.6.
Figure 3.8 Basic and alternative flows with pre- and postconditions.
Figure 3.9 Basic and alternative flows for issue book use case.
Table 3.7 Scenario matrix for the flow of events shown in Figure 3.8
Scenario 1 Basic flow
Scenario 2 Basic flow Alternative flow 1
Scenario 3 Basic flow Alternative flow 1 Alternative flow 2
Scenario 4 Basic flow Alternative flow 3
Scenario 5 Basic flow Alternative flow 3 Alternative flow 4
Scenario 6 Basic flow Alternative flow 3 Alternative flow 1
Scenario 7 Basic flow Alternative flow 3 Alternative flow 1 Alternative flow 2
The scenario matrix shows all instances of a use case. It represents all possible paths that
may be generated in a use case. These instances (paths) may help us to generate test cases. After
identification of inputs for a use case and its instances (using scenario matrix), test cases are
generated. Hence, scenarios help us to generate test cases from the use cases.
EXAMPLE 3.3 Consider the use case of return book of the LMS case study given in
Section 3.1. Draw the use case scenario diagram for it.
Solution Use case scenario diagram for the return book use case is given in Figure 3.10.
Figure 3.10 Basic and alternative flows for return book use case.
Complete
Consistent
Verifiable
Modifiable
Clear (concise, terse, simple, precise)
Feasible (realistic, possible)
Necessary
Understandable
Each of the above-mentioned characteristics is discussed here as per details given in IEEE
(2001), Thayer and Dorfman (1997) and Young (2001).
3.6.1 Correct
If a requirement addresses a factual situation(s), then such situation(s) must be factually correct.
Requirement 1: A member of a library gets five books issued for one month.
There are different types of members in a library like faculty, students and employees.
Hence, five books figure and issued duration may depend on the type of member. So, five books
and one month figures are incorrect.
3.6.2 Unambiguous
The requirement should have only one interpretation. If the requirement is shown to many
people, all should have the same interpretation. If there are more than one interpretation, then
that requirement is probably ambiguous. Sometimes acronyms are used in a requirement and
may become a reason for ambiguity. Consider the following requirement:
Requirement 2: Login ID shall be alphanumeric of length in the range of 4 to 15
characters. Special characters and blank spaces are not allowed.
There is an ambiguity in the above requirement; it is not clear what will the system do.
(i) Do not allow the user to enter blank spaces or special characters.
(ii) Display an error message if the user enters special characters or blank spaces.
(iii) Automatically it will not include special characters and blank spaces.
Hence, the modified requirement shall be given as:
Requirement 2: Login ID shall be alphanumeric of length in the range of 4 to 15
characters. Special characters and blank spaces are not allowed. The system will not
allow the user to enter blank spaces or special characters.
Requirements are written in natural languages (e.g. English) which are inherently ambiguous.
Care should be taken, while writing requirements, in order to minimize the ambiguities.
3.6.3 Complete
A requirement should specify all conditions that may occur.
84 Object-Oriented Software Engineering
Requirement 3: The student shall access the LMS on the university’s library LAN to
search the availability of a book from the library.
What will happen to the other members of the library? Will they be able to search a book using
the university’s library LAN? If yes, the sentence should be as follows:
Requirement 3: The student/faculty/employee shall access the LMS on the university’s
library LAN to search the availability of a book from the library.
If we do not want to extend this facility to the other members (faculty/employee), then the
sentence should be as follows:
Requirement 3: The student shall access the LMS on the university’s library LAN to
search the availability of a book from the library. However, the faculty and employees
shall not access this search facility on the university’s library LAN.
3.6.4 Consistent
There shall not be any conflicts between the requirements.
Requirement 4: New Password: Alphanumeric of length in the range of 4 to 15
characters. Blank spaces are not allowed. However, special characters are allowed.
Requirement 5: Confirm Password: Alphanumeric of length in the range of 4 to 15
characters. Blank spaces are allowed. However, special characters are not allowed.
There are inconsistencies between Requirement 4 and Requirement 5. Requirement 4 does
not allow blank spaces and does allow special characters in password format, whereas
Requirement 5 does allow blank spaces and does not allow special characters in the password
format. Consistencies should be maintained amongst requirements and conflicting requirements
must be corrected immediately.
3.6.5 Verifiable
A requirement should be verifiable. It should not use words like “works well”, “good human
interface” and “shall usually happen”. Requirements using these words are not verifiable because
the terms good, well and usually are not quantifiable. These terms have different meanings to
different persons. Consider the following requirement:
Requirement 6: Every member should be able to quickly search a book using the
university’s library LAN.
The word “quickly” is not verifiable. It has different meanings for different persons. This
requirement is not verifiable. The modified requirement may be given as:
Requirement 6: Every member should be able to search a book within 5 seconds using
the university’s library LAN.
Ambiguous words like robust, safe, accurate, flexible, reliable, safely, quickly, etc. should be
avoided in framing requirements. These words are not verifiable and also make the sentence
ambiguous.
Software Requirements Elicitation and Analysis 85
3.6.6 Modifiable
A requirement is modifiable if changes can be made easily, completely and consistently while
retaining its structure and style. The requirement should also be non-redundant. Redundancy
itself is not an error, but it can easily lead to errors. If a change is made at one place and
the other place is ignored, it leads to inconsistency of requirements. Whenever redundancy is
necessary, it should be written in a table so that changes shall be made at all places.
3.6.7 Clear
A requirement should be written clearly, precisely and in simple short sentences. Consider the
following requirement:
Requirement 7: Login ID should be of specified range of 4 to 15 and alphabets, numeric
letters should be used in a login ID. Special characters should not be used however we
should be able to differentiate between alphabets and special characters, blank spaces
which are sometimes treated as special characters should also not be allowed.
A simple requirement may be written clearly as:
Requirement 7: Login ID: Alphanumeric of length in the range of 4 to 15 characters.
Special characters and blank spaces are not allowed.
Hence, sentences should be simple, short, clear, precise and unambiguous.
3.6.8 Feasible
A requirement shall be feasible if and only if it is implementable within given time, resources,
money and technology.
Requirement 8: A library management system shall provide smart card with web-
enabled services to every member. Digital versions of books shall be available to every
member at any time and from any place using smart card.
This requirement is technically feasible but difficult to implement within short time and limited
budget.
3.6.9 Necessary
A requirement is unnecessary if it is not requested by any stakeholder. Moreover, removing such
a requirement should also not affect the present system.
This type of requirement may be added by developers with the assumption that it may be
needed by stakeholders. If there is no use of such a requirement and if it is not important for the
system, that requirement may be removed from the list.
3.6.10 Understandable
Requirements should be written in simple, short and clear sentences. Standard style and
conventions should be used. The word “shall” should be used instead of “will”, “must” or “may”.
86 Object-Oriented Software Engineering
Sentences should also be grammatically correct and unambiguous. Difficult words should be
avoided and their simple synonyms should be used.
These sections are discussed below along with their section numbers as in Table 3.8. The
concepts are also explained with the help of the case study of the LMS. The complete SRS is
given in the Appendix.
88 Object-Oriented Software Engineering
1. Introduction
This section gives the overview of the complete SRS document.
1.1 Purpose
We should describe the purpose of the SRS document and also list the intended audience for the
document. The purpose of the LMS is given as:
1.1 Purpose
The library management system (LMS) maintains the information about various books available
in the library. The LMS also maintains records of all the students, faculty and employees in
the university. These records are maintained in order to provide membership to them.
1.2 Scope
The task of this subsection is to:
(i) Assign a name to the software under development.
(ii) List the functions which will be provided and also those functions which the software
will not do.
(iii) Explain the applications of the software along with possible benefits and objectives.
(iv) Maintain consistency amongst statements.
The scope of the LMS is given as:
1.2 Scope
The name of the software is library management system (LMS). The system will be referred
to as LMS in rest of the SRS. The proposed LMS must be able to perform the following
functions:
Dos
1. Issue of login ID and password to system operators.
2. Maintain details of books available in the library.
3. Maintain details of the students in the university to provide student membership.
4. Maintain details of the faculty and employees in the university to provide faculty and
employees membership.
5. Issue a book.
6. Bring a book back, and calculates fine if the book is being returned after the specified
due date.
7. Reserve a book.
8. Provide search facility to check the availability of a book in the library.
9. Generate the following reports:
(a) List of books issued by a member.
(b) Details of books issued and returned on daily basis.
(c) Receipt of fine.
Software Requirements Elicitation and Analysis 89
1.4 References
This subsection provide a list of all documents including books and research papers referenced
anywhere in the SRS document. The referenced material used in LMS is given as:
1.4 References
(a) Software Engineering by K.K. Aggarwal & Yogesh Singh, New Age Publishing House,
3rd Edition, 2008.
(b) IEEE Recommended Practice for Software Requirements Specifications— IEEE
Std 830-1998.
(c) IEEE Standard for Software Test Documentation—IEEE Std. 829-1998.
1.5 Overview
This subsection of the SRS gives the overview of the software system. Explain what the rest of
the SRS contains and also gives details about the organization of the SRS document.
2. Overall Description
This section discusses the general factors which affect the requirements, and the final product
specific requirements are not discussed. This section may help to write specific requirements of
section 3 of the SRS document. The overview of the LMS is given as:
2. Overall Description
The LMS maintains records of books in the library and membership details of students,
faculty and employees in the university. It is assumed that approved books have already been
purchased by the acquisition section. It is also assumed that the student has already been
admitted in the university for a specific programme. The system administrator will receive
lists of the admitted students (school-wise and programme-wise) from the academic section.
The establishment section will provide the list of the faculty and employees appointed in the
university.
The LMS issues books to students, faculty and employees and brings the same back from
them. The LMS generates fine if the book is returned by a student after the due date. It also
allows students, faculty and employee to reserve a book. The student/faculty/employee can
access LMS on the university’s library LAN in order to search the availability of the book
from the library.
The administrator/DEO will have to maintain the following information:
Book details
Student membership details
Faculty and employee membership details
The administrator/library staff will perform the following functions:
Issue a book
Return a book
Reserve a book
Query a book
Software Requirements Elicitation and Analysis 91
Generate reports
List of books issued to a member
Details of books issued and returned on daily basis
Receipt of fine
Total available books in the library
List of library members along with issued books
The administrator/student/faculty/employee requires the following information from the
system:
List of available books in the library:
Author-wise
Book title-wise
Publisher-wise
Subject-wise
2.4 Constraints
We may list constraints that may limit the developer’s implementation options. These constraints
may include:
(i) Regulatory policies
(ii) Hardware limitations
(iii) Interface to other applications
(iv) Parallel operations
(v) Audit functions
(vi) Control functions
(vii) Higher-order language requirements
(viii) Protocols
(ix) Reliability requirements
(x) Safety, security and criticality of the application
The constraints for the LMS are given as:
2.4 Constraints
The software does not maintain records of periodicals.
There will be only one administrator.
The delete operation is available to the administrator and DEO. To reduce the complexity
of the system, there is no check on delete operation. Hence, the administrator/DEO
should be very careful before deletion of any record and he/she will be responsible for
data consistency.
The user will not be allowed to update the primary key.
2.5 Assumptions and Dependencies
This subsection includes assumptions and dependencies for the implementation of the software
product. These assumptions may be very important and may become input for the design and
implementation of the software system.
User Class
Some systems provide different sets of functions to different classes of users. The outline is
given in Table 3.11.
(Contd.)
Software Requirements Elicitation and Analysis 97
Table 3.11 Template of SRS section 3 organized by user class (Contd.)
3.2.2 User class 2
.
.
.
3.2.m User class m
3.2.m.1 Functional requirement m.1
.
.
.
3.2.m.n Functional requirement m.n
3.3 Performance requirements
3.4 Design constraints
3.5 Software system attributes
3.6 Other requirements
Objects
The outline of arranging section 3 by objects is given in Table 3.12.
Feature
A feature is an externally desired service by the system that may require a sequence of inputs to
affect the desired result. Each feature is generally described as a sequence of stimulus response
pairs. The outline is given in Table 3.13.
Stimulus
Some systems are best organized by describing their functions in terms of stimuli. The outline
is given in Table 3.14.
(Contd.)
Software Requirements Elicitation and Analysis 99
Table 3.14 Template of SRS section 3 organized by stimulus (Contd.)
3.2 Functional requirements
3.2.1 Stimulus 1
3.2.1.1 Functional requirement 1.1
.
.
.
3.2.1.n Functional requirement 1.n
3.2.2 Stimulus 2
.
.
.
3.2.m Stimulus m
3.2.m.1 Functional requirement m.1
.
.
.
3.2.m.n Functional requirement m.n
3.3 Performance requirements
3.4 Design constraints
3.5 Software system attributes
3.6 Other requirements
Response
Some systems are best organized by describing their functions in support of the generation of a
response. The outline is the same as given in Table 3.14 (stimulus is replaced by response).
Functional Hierarchy
Functions are organized in terms of their hierarchy with respect to either common inputs,
common outputs or common internal data access. Data flow diagrams and data dictionaries
may be used to show the relationships amongst the functions and data. The outline is given in
Table 3.15.
(Contd.)
100 Object-Oriented Software Engineering
3. Specific Requirements
This section contains the software requirements in detail along with the various forms to be
developed.
Issue Book
This form will be accessible only to the system administrator and library staff. It will allow
him/her to issue existing book(s) to the student(s).
102 Object-Oriented Software Engineering
3.2 Functions
Functional requirements define the fundamental actions that must take place in the software
when inputs are accepted, and processed, and outputs are accordingly generated. Generally,
the most popular way to implement this process is to write use case description. The use case
description addresses all actions when an actor interacts with the system for a specified purpose.
We may also include validity checks on inputs, sequencing information about operations, and
error handling/response to abnormal situations. A few use case descriptions of LMS are given
below in the specified template. The validity check and error handling information is also
provided.
Software Requirements Elicitation and Analysis 103
Special Requirements
None
Associated Use Cases
Login
B. Validity Checks
(i) Only the administrator/DEO will be authorized to access the Book Details module.
(ii) Every book will have a unique accession number.
(iii) Accession number cannot be blank.
(iv) Accession number can only have value from 10 to 199999 digits.
(v) Subject descriptor cannot be blank.
(vi) ISBN number cannot be blank.
(vii) Length of ISBN number for any user can only be equal to 11 digits.
(viii) ISBN number will not accept alphabets, special characters and blank spaces.
(ix) Title cannot be blank.
(x) Length of title can be of 3 to 100 characters.
(xi) Title will only accept alphabetic characters, brackets, numeric digits and blank spaces.
(xii) Language cannot be blank.
(xiii) Author (first name and last name) cannot be blank.
(a) Length of first name and last name can be of 3 to 100 characters.
(b) First name and last name will not accept special characters and numeric digits.
(xiv) Publisher cannot be blank.
(xv) Length of first name and last name can be of 3 to 300 characters.
(xvi) Publisher will not accept special characters and numeric digits.
C. Sequencing Information
None
D. Error Handling/Response to Abnormal Situations
If any of the validation flows does not hold true, an appropriate error message will be prompted
to the user for doing the needful.
Postcondition
If the use case is successful, then student information is added/updated/deleted/viewed from
the system. Otherwise, the system state is unchanged.
Flow of Events
Basic Flow
This use case starts when the administrator/DEO wishes to add, update, delete or view student
information from the system.
1. The system requests that the administrator/DEO specify the function he/she would like
to perform (either add a student, update a student record, delete a student record).
2. Once the administrator/DEO provides the requested information, one of the subflows
is executed.
If the administrator/DEO selects “Add a Student”, the Add a Student subflow is
executed.
If the administrator/DEO selects “Update a Student”, the Update a Student
subflow is executed.
If the administrator/DEO selects “Delete a Student”, the Delete a Student subflow
is executed.
If the administrator/DEO selects “View a Student”, the View a Student subflow is
executed.
Basic Flow 1: Add a Student
The system requests that the administrator/DEO enter the user information. This includes:
Membership number
Photograph
Roll No.
Name
School
Programme
Father’s name
Date of birth
Address
Telephone
Email
Membership date
Valid up to
Password
Once the administrator/DEO provides the requested information, the system checks that
student membership number is unique. The student is added to the system.
Basic Flow 2: Update a Student
1. The system requests that the administrator/DEO enter the student’s membership
number.
2. The administrator/DEO enters the student’s membership number.
Software Requirements Elicitation and Analysis 107
4 Robustness The extent to which the software tolerates the unexpected problems.
5 Simplicity The extent to which the software is simple in its operations.
6 Traceability The extent to which an error is traceable in order to fix it.
7 Usability The extent of effort required to learn, operate and understand the
functions of the software.
8 Accuracy Meeting specifications with precision.
9 Clarity and accuracy of The extent to which documents are clearly and accurately written.
documentation
10 Conformity of operational The extent to which the software is in conformity of operational
environment environment.
11 Completeness The extent to which the software has specified functions.
12 Efficiency The amount of computing resources and code required by the software
to perform a function.
13 Testability The effort required to test the software to ensure that it performs its
intended functions.
14 Maintainability The effort required to locate and fix an error during maintenance
phase.
15 Modularity It is the extent of ease to implement, test, debug and maintain the
software.
16 Readability The extent to which the software is readable in order to understand.
17 Adaptability The extent to which the software is adaptable to new platforms and
technologies.
18 Modifiability The effort required to modify the software during maintenance phase.
19 Expandability The extent to which the software is expandable without undesirable
side effects.
20 Portability The effort required to transfer a program from one platform to another
platform.
Software Requirements Elicitation and Analysis 111
The quality considerations in the LMS are given as follows:
IEEE Std 830-1998 has given various ways to organize section 3 and depending on the project,
customer’s expectations and developers expertise, we may choose one way for the organization
of the SRS document.
3.7 Organizing the Specific Requirements
The details are given in the beginning of section 3.
3.8 Additional Comments
We may choose any one organization and the selection is dependent on the developer’s expertise,
previous experience, customer’s expectations, available technologies, etc. Sometimes, more than
one organization may also be used for organizing section 3 of the SRS document.
4. Supporting Information
Supporting information makes the SRS easier to use. It may include table of contents, index,
appendixes, etc.
change includes activities such as establishing a baseline, determining which dependencies are
important to trace, establishing traceability between different items and change control (Rational
Software, 2002).
Requirements change management is a systematic process of understanding and controlling
changes in requirements. Any change in the requirements is not an independent activity and may
have impact on other requirements, which make the area much more difficult and challenging.
The various steps for change management are given in the next subsections.
A traceability relationship tells that if there is a change in one element (for example initial
requirements), it may affect another element (for example use cases).
The use cases may be traced to the requirements in the IRD as shown in Figure 3.12.
The above requirement can be traced from use case “Issue book”:
This use case documents the steps that must be followed in order to get a book issued.
114 Object-Oriented Software Engineering
The change request form documents the description of change. Its impact on other parts
is also analysed and documented. Cost of change is estimated and priority is assigned. All
these information is submitted to the change control authority (CCA) to take a decision about
acceptance of change request. If decision of the CCA is in favour of accepting a change, then the
CCA issues an approval of change. After this, the change is implemented. The revised software
is handed over to the software quality assurance (SQA) team for revalidation and also to ensure
that the change has not adversely affected other parts of the software. The modified software
is handed over to the software configuration team and is incorporated in a new version of the
system.
Review Questions
1. “The goal of requirements analysis is to develop a model of what the system will do.”
Explain this statement with the help of the steps that a requirements analyst will follow
throughout the analysis.
2. Who are the important stakeholders in software projects? Identify.
3. Discuss the key strategies in eliciting information about the user’s requirement.
4. Explain the importance of requirements. How many types of requirements are possible
and why?
Software Requirements Elicitation and Analysis 115
5. List out requirements elicitation techniques. Which one is most popular and why?
6. What is software prototyping? Explain with the help of an example.
7. A university wishes to develop a software system for the student result management
of its M.Tech. programme. A problem statement is to be prepared for the software
development company. The problem statement may give an overview of the existing
system and broad expectations from the new software system.
8. What are the characteristics of a good software requirement specification (SRS)
document?
9. Consider the problem of result preparation automation system of B.Tech. courses (or
MCA program) of any university and design the following:
(i) Identification of use cases and actors
(ii) Use case diagram
10. Requirements analysis is unquestionably the most communication intensive step in
the software engineering process. Why does the communication path frequently break
down?
11. What is the purpose of extension and inclusion association between use cases? Explain
with the help of an example.
12. Compare and contrast various requirements elicitation methods.
13. Which requirements elicitation is most popular? Explain.
14. Consider the following Transport Company Automation (TCA) software. A transport
company requires to automate its various operations. The company has a fleet of
vehicles. Currently, the company has the following vehicles:
Ambassadors: 10 Non-AC, 2 AC
Tata Sumo: 5 Non-AC, 5 AC
Maruti Omni: 10 Non-AC
Maruti Esteem: 10 AC
Mahindra Armada: 10 Non-AC
The company rents out vehicles to customers. When a customer requests for a car,
the company lets them know what types of vehicles are available and the charges for
each car. For every car, there is a per-hour charge and a per-kilometer charge. A car
can be rented for a minimum of 4 hours. The amount chargeable to a customer is the
maximum of (per-hour charge for the car times the number of hours used, and per-
kilometer charge times the number of kilometers run) subject to a minimum amount
decided by the charge for 4-hour use of the car. An AC vehicle of a particular category
is charged 50% more than a non-AC vehicle of the same category. There is a charge of
` 150 for every night halt regardless of the type of the vehicle.
When a customer books a car, he has to deposit an advance amount. The customer
also informs the company when he expects to return the car. When the car is returned,
depending on the usage, either the customer is refunded some amount, or he has to pay
additional amount to cover the cost incurred.
116 Object-Oriented Software Engineering
In addition to automating the above activities, the company wants to collect statistics
about various types of vehicles such as average amount of money spent on repairs for
the car, average demand, revenue earned by renting out the car, and fuel consumption of
the car. Based on these statistics, the company may take a decision about which vehicles
are more profitable. The statistics can also be used to decide the charge for different
types of vehicles.
Draw the following using standard notations. If necessary, you can make suitable
assumptions regarding the details of various features of TCA software, but you must
clearly write down the assumptions you make.
(i) Draw use case diagram for the TCA software.
(ii) Write use case description of any two use cases.
15. What is software requirements specification (SRS)? List five desirable characteristics
of a good SRS document. Discuss the relative advantages of formal requirement
specifications. List the important issues which an SRS must address.
16. Write the use case description for Cash Withdrawal from an ATM machine
17. Discuss the role of use cases in object-oriented requirements analysis.
18. Consider the following bookshop automation system (BAS) software.
BAS should enable the shop clerk to enter the details of various books the shop
deals with and change the inventory level of various books when new stocks arrive.
BAS should help the customers query whether a book is in stock. The users can
query the availability to a book either by using the book’s title or by using a partial
name of the author. If a book is in stock, the exact number of copies available and
the rack number in which the book is located should be displayed. If a book is not in
the stock, the query for the books is used to increment a request field for the book. The
manager can periodically view the request field of the books to roughly estimate the
current demand for different out-of-stock books.
BAS should maintain the price of various books. As soon as a customer selects a
book to purchase, the sales clerk would enter the ISBN number of the book. BAS should
decrement the stock to reflect the book sale and generate the sales receipt for the book.
Upon request, BAS should generate sales statistics (viz. book name, publisher, ISBN
number, number of copies sold and the sales revenue) for any period. BAS should enable
the manager to view publisher-wise sales (e.g. sale of all books of any given publishing
house) over a period.
A software system is required to be developed to maintain telephone directory and
billing system. The software should be able to update/modify billing system and be able
to maintain the directory of the subscribers.
(i) Identify actors and use cases.
(ii) Draw the use case diagram for the BAS software.
(iii) Write the use case description of any two use cases.
19. The subscriber should be able to view the directory and search for a specific phone
number according to the phone number, address and name.
Software Requirements Elicitation and Analysis 117
A bill should be calculated on a monthly basis. Out of the total metered calls,
150 calls are free and rest all calls are called chargeable calls. The bill is calculated at
` 1.50 per call. The subscriber is given 10 days to pay the bill, if he fails to do so, he
has to pay a fine of ` 500. The bill should show the status of the previous month’s bill,
that is, whether the last month bill was paid or not. The fine should be calculated if the
bill is not paid within the due time (within 10 days from the date of issue of the bill). If
the fine is paid within the due time, then no more action needs to be taken. But if the
fine and the total payable amount is not paid within the due date, then that subscriber
should be marked as not to be given any further services (only incoming is allowed).
The subscriber can pay this amount at any time and reinitialize the services. If the total
amount is not paid for 2 years, then the phone line should be disconnected.
A report is to be generated which analyses the total number of subscribers under
an exchange area, revenue generated and total revenue generated for all the areas, on a
monthly or yearly basis.
(i) Identify actors and use cases.
(ii) Draw the use case diagram for the above software.
20. Air ticket reservation (ATR) system is a software required to automate the reservation
system for an airline at an airport or elsewhere. The primary task deals with the
following functionalities:
Maintenance of user account
Maintenance of flight database, i.e. flight number, timing, number of seats, etc.
Reservation of air tickets
Cancelling of air tickets
Enquiry about flight schedules, fares, timings, etc.
Reports regarding day-to-day bookings, ticket availability, passengers database, etc.
Air ticket may be issued on demand for any flight to and from any destination for any
date and in any class as desired by the passenger depending on the availability.
After any issue or cancellation of the ticket, the corresponding information has to
be updated so that the ticket availability shows the status of the seats actually available/
unavailable. Enquiries made by the passenger also need to be furnished disclosing
the timing and availability of flight and air tickets in particular classes for the dates
provided by the enquirer.
For the sale of an air ticket or for its cancellation, money will be paid or refunded
and thus there will be a need for account maintenance, which may include ledger, sale
book receipt, etc.
The system is expected to be able to help in the running of the air ticket reservation
counter at an airport or elsewhere, thus helping in the overall functioning of any airlines
government or private.
There will also be a detailed account of all the passenger list for all flights, thus
aiding in cross checking any information that may be of use to the airline or any other
authorities.
(i) Identify actors and use cases.
(ii) Draw the use case diagram for the ATR software.
(iii) Write the use case description of reservation of airlines.
118 Object-Oriented Software Engineering
21. The proposed software product is the Hospital Patient Management System (HPMS).
The system will be used to allocate beds to patients on a priority basis, and to assign
doctors to patients in designated wards as need arises. Doctors will also use the system
to keep track of the patients assigned to them. Nurses who are in direct contact with the
patients will use the system to keep track of available beds, the patients in the different
wards, and the types of medication required for each patient. The current system in use
is a paper-based system. It is too slow and cannot provide updated lists of patients within
a reasonable time frame. Doctors must make rounds to pick up patients’ treatment cards
in order to know whether they have cases to treat or not. The intentions of the system
are to reduce over-time pay and increase the number of patients that can be treated
accurately.
(i) Identify actors and use cases.
(ii) Draw the use case diagram for the above software.
(iii) Write the use case description of reservation of airlines.
22. Consider the case where Mr. A gives a call to Mr. B. Identify and discuss the use cases
for the same.
23. Draw a use case diagram for e-shopping system.
24. A simple flight simulator is to be built/developed, using a bit-mapped display. Present a
perspective view from the cockpit of a small airplane, periodically updated to reflect the
motion of the plane. The world in which flights take place includes mountains, rivers,
lakes, roads, bridges, a radio tower and of course a runaway. Control inputs are from
two joysticks. The left operates the radar and engine. The right one controls ailerons and
elevator. Draw the use case diagram.
25. We can apply use case analysis as early as requirements analysis. Comment.
26. Draw a use case diagram for “Point-of-sale” terminal for the sale and payment of the
customer.
27. Identify different use cases for a tea/coffee/soup vending machine.
28. What is a use case model? Why is the use case modelling useful in analysis?
29. Describe the use case-driven approach by Ivar Jacobson.
30. What is the significance of requirements change management in software development?
Why is requirements traceability becoming important? Explain the change control
process.
Further Reading
Jacobson provides a classic introduction on use case approach in:
Jacobson, I.V., Object Oriented Software Engineering: A Use Case Driven Approach.
New Delhi: Pearson Education, 1999.
Cockburn provides guidance for writing and managing use cases. This may help to reduce
common problem associated with use cases:
122 Object-Oriented Software Engineering
Cockburn, A., Writing Effective Use Cases. New Delhi: Pearson Education, 2001.
Hurlbut’s paper provides a survey on approaches for formalizing and writing use cases:
Hurlbut, R., A Survey of Approaches for Describing and Formalizing Use-Cases, Technical
Report 97–03, Department of Computer Science. Illinois Institute of Technology, USA,
1997.
Fournier has discussed the relationship between actor and system in:
Fournier, G., Essential Software Testing—A Use Case Driven Approach. New York CRC Press,
2009.
Other useful texts are available at:
Booch, G., Rumbaugh, J. and Jacobson, I.V., The Unified Modeling Language User Guide.
Boston: Addison-Wesley, 1999.
Rational Requisite Pro, User’s Guide, Rational Software Corporation, 2003.
Rational Rose User’s Guide. IBM Corporation, 2003.
Tague, N.R., The Quality Toolbox. Milwaukee, WI: ASQ Quality Press, 2004.
The most current information about UML can be found at:
http://www.rational.com
http://www.omg.org