Software Engineering NOTES
Software Engineering NOTES
?
Thank You!
Software Engineering
• success 16%
• failure 31%
• over budget 53%
Problems of software crisis:
• Y2K problem
-related to date format
-problem arise in year 2000
- all the softwares stopped working
-format changed from ddmmyy to ddmmyyyy.
-example:
-In 19th century date format used was ddmmyy(say 1st jan 1999 was written as
010199 and it year is assumed to be 1999 by default )
- but, when 20 th century came, (say 1 st jan 2000 was written as 010100 and
according to old format year was assumed to be 1900)
- so all the software failed.
-currently, we use yyyy instead of yy.
Thank You!
Software Engineering
• Any software should be judged by what it offers and what are the
methods which help you to use it.
• Every software must satisfy the following attributes:
-Operational
-Transitional
-Maintenance
Operational
• This aspect talks about how well software has the capabilities to
adapt itself in the quickly changing environment:
• Flexibility
• Maintainability
• Modularity
• Scalability
Thank you!
Software Engineering
Prepared by: Neha Tripathi
Need of Software Engineering
• Reduces complexity:
Big software is always complicated and challenging to progress. Software engineering has a
great solution to reduce the complication of any project. Software engineering divides big
problems into various small issues. And then start solving each small issue one by one. All
these small problems are solved independently to each other.
• To minimize software cost:
Software needs a lot of hardwork and software engineers are highly paid experts. A lot of
manpower is required to develop software with a large number of codes. But in software
engineering, programmers project everything and decrease all those things that are not
needed. In turn, the cost for software productions becomes less as compared to any software
that does not use software engineering method.
• To decrease time:
Anything that is not made according to the project always wastes time. And if you are
making great software, then you may need to run many codes to get the definitive running
code. This is a very time-consuming procedure, and if it is not well handled, then this can take
a lot of time. So if you are making your software according to the software engineering
method, then it will decrease a lot of time.
• Handling big projects:
Big projects are not done in a couple of days, and they need lots of patience, planning, and
management. And to invest six and seven months of any company, it requires heaps of planning, direction,
testing, and maintenance. No one can say that he has given four months of a company to the task, and the
project is still in its first stage. Because the company has provided many resources to the plan and it
should be completed. So to handle a big project without any problem, the company has to go for a
software engineering method.
• Reliable software:
Software should be secure, means if you have delivered the software, then it should work for at least
its given time or subscription. And if any bugs come in the software, the company is responsible for solving
all these bugs. Because in software engineering, testing and maintenance are given, so there is no worry
of its reliability.
• Effectiveness:
Effectiveness comes if anything has made according to the standards. Software standards are the big
target of companies to make it more effective. So Software becomes more effective in the act with the
help of software engineering.
Applications of Software
The most significant factor in determining which software engineering methods and
techniques are most important is the type of application that is being developed.
• System Software: A collection of programs written to service other programs. Compiler,
device driver, editors, file management.
• Application software or stand alone program: It solves a specific Business needs. It is
needed to convert the business function in real time. Example -point of sale,
Transaction processing, real time manufacturing control.
• Scientific / Engineering Software: Applications like based on astronomy, automative
stress analysis , molecular Biology, volcanology, space Shuttle orbital dynamic,
automated manufacturing.
• Embedded Software: There are software control systems that control and manage
hardware devices. Example- software in mobile phone, software in Anti Lock Braking in
car, software in microwave oven to control the cooking process.
• Product Line Software: It is designed to provide a specific capability for use by many
different customers. It can focus on unlimited or esoteric Marketplace like inventory
control products. Or address mass market place like : Spreadsheets, computer graphics,
multimedia, entertainment, database management, personal, business financial
applications.
• Web application: It is also called " web apps ", are evolving into sophisticated
computing environment that not only provide stand alone features, computing
functions, and content to the end user but also are integrated with corporate database
and business applications.
• Artificial intelligence software: This include- robotic, expert system, pattern
recognition, image and voice, artificial neural network, game playing, theorem proving
... It solves Complex problems.
• Networking and Web Applications Software –Networking
Software provides the required support necessary for computers
to interact with each other and with data storage facilities. The
networking software is also used when software is running on a
network of computers (such as World Wide Web). It includes all
network management software, server software, security and
encryption software and software to develop web-based
applications like HTML, PHP, XML, etc.
• Business Software –This category of software is used to support
the business applications and is the most widely used category of
software. Examples are software for inventory management,
accounts, banking, hospitals, schools, stock markets, etc.
• Entertainment Software –Education and entertainment software
provides a powerful tool for educational agencies, especially
those that deal with educating young children. There is a wide
range of entertainment software such as computer games,
educational games, translation software, mapping software, etc.
• Utilities Software –The programs coming under this category perform specific tasks and
are different from other software in terms of size, cost and complexity. Examples are
anti-virus software, voice recognition software, compression programs, etc.
• Document Management Software –A Document Management Software is used to
track, manage and store documents in order to reduce the paperwork. Such systems
are capable of keeping a record of the various versions created and modified by
different users (history tracking). They commonly provide storage, versioning,
metadata, security, as well as indexing and retrieval capabilities.
• Reservation Software –A Reservation system is primarily used to store and retrieve
information and perform transactions related to air travel, car rental, hotels, or other
activities. They also provide access to bus and railway reservations, although these are
not always integrated with the main system. These are also used to relay computerized
information for users in the hotel industry, making a reservation and ensuring that the
hotel is not overbooked.
Thank you!
Software Engineering
Prepared by: Neha Tripathi
Design
Design Data
Dataflow
floworiented
oriented
Design
Design Object
Object ––oriented
Emergence oriented
of The
The Design
Design
Software Engineering
improvement
improvement of of the
the software
software
Software engineering discipline is the result of advancement in the field of technology. In
this section, we will discuss various innovations and technologies that led to the
design
design methodology
methodology overover the
the
emergence of software engineering discipline.
last
last 50
50 yrs
yrs have
have indeed
indeed been
been
remarkable.
remarkable.
Emergence of Software Engineering
Early Computer Programming (1950s):
(Exploratory programming style)
• It was found:
• GO TO statements makes control structure of a program messy
• GO TO statements alter the flow of control arbitrarily.
• The need to restrict use of GO TO statements was recognized.
• But, soon it was conclusively proved:
• only three programming constructs are sufficient to express any programming
logic:
• sequence (e.g. a=0;b=5;)
• selection (e.g. if(c=true) k=5 else m=5;)
• iteration (e.g. while(k>0) k=j-k;)
• Everyone accepted:
• it is possible to solve any programming problem without using GO TO statements.
• This formed the basis of Structured Programming methodology.
Structured Programming
• Object-oriented technique:
• an intuitively appealing design approach:
• natural objects (such as employees, pay-roll-register, etc.)
occurring in a problem are first identified.
• Relationships among objects:
• such as composition, reference, and inheritance are
determined.
• Each object essentially acts as
• a data hiding (or data abstraction) entity.
• Object-Oriented Techniques have gained wide acceptance:
• Simplicity
• Reuse possibilities
• Lower development time and cost
• More robust code
• Easy maintenance
Differences between the exploratory style and modern software
development practices
• A written description:
• forms a common understanding of activities among the software developers.
• helps in identifying inconsistencies, redundancies, and omissions in the
development process.
• Helps in tailoring a process model for specific projects.
• The development team must identify a suitable life cycle model:
• and then adhere to it.
• Primary advantage of adhering to a life cycle model:
• helps development of software in a systematic and disciplined manner.
• When a program is developed by a single programmer ---
• he has the freedom to decide his exact steps.
• When a software product is being developed by a team:
• there must be a precise understanding among team members as to when to do
what,
• otherwise it would lead to chaos and project failure.
• A software project will never succeed if:
• one engineer starts writing code,
• another concentrates on writing the test document first,
• yet another engineer first defines the file structure
• another defines the I/O for his portion first.
• A life cycle model:
• defines entry and exit criteria for every phase.
• A phase is considered to be complete:
• only when all its exit criteria are satisfied.
• The phase exit criteria for the software requirements specification phase:
• Software Requirements Specification (SRS) document is complete, reviewed, and
approved by the customer.
• A phase can start:
• only if its phase-entry criteria have been satisfied.
• It becomes easier for software project managers:
• to monitor the progress of the project.
• When a life cycle model is adhered to,
• the project manager can at any time fairly accurately tell,
• at which stage (e.g., design, code, test, etc. ) of the project is.
• Otherwise, it becomes very difficult to track the progress of the project
• the project manager would have to depend on the guesses of the team
members.
• This usually leads to a problem:
• known as the 99% complete syndrome.
• Many life cycle models have been proposed.
• We will confine our attention to a few important and commonly used models.
• classical waterfall model
• iterative waterfall,
• evolutionary,
• prototyping, and
• spiral model
Summary
• Software Development Life Cycle (SDLC) is a process used by the software industry to
design, develop and test high quality software.
• The SDLC aims to produce a high-quality software that meets or exceeds customer
expectations, reaches completion within times and cost estimates.
• SDLC consists of a detailed plan which explains how to plan, build, and maintain specific
software.
• Every phase of the SDLC life cycle has its own process and deliverables that feed into
the next phase.
• SDLC is the acronym of Software Development Life Cycle.
• It is also called as Software Development Process.
• SDLC is a framework defining tasks performed at each step in the software
development process.
Why SDLC?
• In this phase, developers start build the entire system by writing code using the chosen
programming language.
• In the coding phase, tasks are divided into units or modules and assigned to the various
developers.
• It is the longest phase of the Software Development Life Cycle process.
• In this phase, Developer needs to follow certain predefined coding standards and
guidelines.
• They also need to use programming tools like compiler, interpreters, debugger to
generate and implement the code.
Testing
• Once the software testing phase is over and no bugs or errors left in the system then
the final deployment process starts.
• At this stage, the goal is to deploy the software to the production environment so
users can start using the product.
• Based on the feedback given by the project manager, the final software is released and
checked for deployment issues if any.
Maintenance
• Once the system is deployed, and customers start using the developed system,
following 3 activities occurs due to which system requires a change:
-Bug fixing - bugs are reported because of some scenarios which are not tested at all
-Upgrade - Upgrading the application to the newer versions of the Software
-Enhancement - Adding some new features into the existing software
• The main focus of this SDLC phase is to ensure that needs continue to be met and that
the system continues to perform as per the specification mentioned in the first phase.
• Maintenance of any software product:
• requires much more effort than the effort to develop the product itself.
• development effort to maintenance effort is typically 40:60.
Types of Maintenance
• Corrective maintenance:
• Correct errors which were not discovered during the product development
phases.
• Perfective maintenance:
• Improve implementation of the system
• enhance functionalities of the system.
• Adaptive maintenance:
• Port software to a new environment,
• e.g. to a new computer or to a new operating system.
• Preventive maintenance:
-to prevent system getting obsolete.
Thank You!
Software Engineering
Prepared by : Neha Tripathi
SDLC-Waterfall Model
1. Feasibility Study: The main goal of this phase is to determine whether it would be financially and
technically feasible to develop the software. The feasibility study involves understanding the problem
and then determine the various possible strategies to solve the problem. These different identified
solutions are analyzed based on their benefits and drawbacks, The best solution is chosen and all the
other phases are carried out as per this solution strategy.
2. Requirements analysis and specification: The aim of the requirement analysis and specification phase
is to understand the exact requirements of the customer and document them properly. This phase
consists of two different activities.
• Requirement gathering and analysis: Firstly all the requirements regarding the software are
gathered from the customer and then the gathered requirements are analyzed. The goal of the
analysis part is to remove incompleteness and inconsistencies.
• Requirement specification: These analyzed requirements are documented in a software
requirement specification (SRS) document. SRS document serves as a contract between
development team and customers. Any future dispute between the customers and the
developers can be settled by examining the SRS document.
3. Design: The aim of the design phase is to transform the requirements specified in the SRS document
into a structure that is suitable for implementation in some programming language.
4. Coding and Unit testing: In coding phase software design is translated into source code using any
suitable programming language. Thus each designed module is coded. The aim of the unit testing phase
is to check whether each module is working properly or not.
5. Integration and System testing: Integration of different modules are undertaken soon after they have
been coded and unit tested. Integration of various modules is carried out incrementally over a number
of steps. During each integration step, previously planned modules are added to the partially integrated
system and the resultant system is tested. Finally, after all the modules have been successfully integrated
and tested, the full working system is obtained and system testing is carried out on this.
System testing consists three different kinds of testing activities as described below :
• Alpha testing: Alpha testing is the system testing performed by the development team.
• Beta testing: Beta testing is the system testing performed by a friendly set of customers.
• Acceptance testing: After the software has been delivered, the customer performed the acceptance
testing to determine whether to accept the delivered software or to reject it.
6. Deployment of system − Once the functional and non-functional testing is done; the product is
deployed in the customer environment or released into the market.
7. Maintenance: Maintenance is the most important phase of a software life cycle. The effort spent on
maintenance is the 60% of the total effort spent to develop a full software. There are basically three
types of maintenance:
• Corrective Maintenance: This type of maintenance is carried out to correct errors that were not
discovered during the product development phase.
• Perfective Maintenance: This type of maintenance is carried out to enhance the functionalities of the
system based on the customer’s request.
• Adaptive Maintenance: Adaptive maintenance is usually required for porting the software to work in
a new environment such as work on a new computer platform or with a new operating system.
When To Use Waterfall Model-Application
• Feedback Path: In the classical waterfall model, there are no feedback paths, so there is
no mechanism for error correction. But in iterative waterfall model feedback path from
one phase to its preceding phase allows correcting the errors that are committed and
these changes are reflected in the later phases.
• Simple: Iterative waterfall model is very simple to understand and use. That’s why it is
one of the most widely used software development models.
Drawbacks of Iterative Waterfall Model
• Difficult to incorporate change requests: The major drawback of the iterative waterfall model is that
all the requirements must be clearly stated before starting of the development phase. Customer may
change requirements after some time but the iterative waterfall model does not leave any scope to
incorporate change requests that are made after development phase starts.
• Incremental delivery not supported: In the iterative waterfall model, the full software is completely
developed and tested before delivery to the customer. There is no scope for any intermediate
delivery. So, customers have to wait long for getting the software.
• Overlapping of phases not supported: Iterative waterfall model assumes that one phase can start
after completion of the previous phase, But in real projects, phases may overlap to reduce the effort
and time needed to complete the project.
• Risk handling not supported: Projects may suffer from various types of risks. But, Iterative waterfall
model has no mechanism for risk handling.
• Limited customer interactions: Customer interaction occurs at the start of the project at the time of
requirement gathering and at project completion at the time of software delivery. These fewer
interactions with the customers may lead to many problems as the finally developed software may
differ from the customers’ actual requirements.
Thank You!
Software Engineering
Prepared by: Neha Tripathi
Prototyping Model
• The Prototyping Model should be used when the requirements of the product are not
clearly understood or are unstable.
• It is also a very good choice to demonstrate the technical feasibility of the product.
• Prototype model should be used when the desired system needs to have a lot of
interaction with the end users.
• Typically, online systems, web interfaces have a very high amount of interaction with
end users, are best suited for Prototype model. It might take a while for a system to be
built that allows ease of use and needs minimal training for the end user.
• Prototyping ensures that the end users constantly work with the system and provide a
feedback which is incorporated in the prototype to result in a useable system. They are
excellent for designing good human computer interface systems.
Advantages –
• The customers get to see the partial product early in the life cycle. This ensures a
greater level of customer satisfaction and comfort.
• New requirements can be easily accommodated as there is scope for refinement.
• Missing functionalities can be easily figured out.
• Errors can be detected much earlier thereby saving a lot of effort and cost, besides
enhancing the quality of the software.
• The developed prototype can be reused by the developer for more complicated
projects in the future.
• Flexibility in design.
Disadvantages –
1. Requirement gathering & analysis: In this phase, requirements are gathered from customers and check
by an analyst whether requirements will fulfil or not. Analyst checks that need will achieve within budget
or not. After all of this, the software team skips to the next phase.
2. Design: In the design phase, team design the software by the different diagrams like Data Flow diagram,
activity diagram, class diagram, state transition diagram, etc.
3. Implementation: In the implementation, requirements are written in the coding language and
transformed into computer programs which are called Software.
4. Testing: After completing the coding phase, software testing starts using different test methods. There
are many test methods, but the most common are white box, black box, and grey box test methods.
5. Deployment: After completing all the phases, software is deployed to its work environment.
6. Review: In this phase, after the product deployment, review phase is performed to check the behaviour
and validity of the developed product. And if there are any error found then the process starts again from
the requirement gathering.
7. Maintenance: In the maintenance phase, after deployment of the software in the working environment
there may be some bugs, some errors or new updates are required. Maintenance involves debugging and
new addition options.
When to use the Iterative Model-Application?
• Evolutionary model is also referred to as the successive versions model and sometimes
as the incremental model.
• In Evolutionary model, the software requirement is first broken down into several
modules (or functional units) that can be incrementally constructed and delivered.
• The development first develops the core modules of the system. The core modules are
those that do not need services from the other modules.
• The initial product skeleton is refined into increasing levels of capability by adding new
functionalities in successive versions.
• Each evolutionary model may be developed using an iterative waterfall model of
development.
• The evolutionary model is shown in the figure. Each successive version/model of the
product is a fully functioning software capable of performing more work than the
previous versions/model.
Evolutionary Development of a Software Product
Evolutionary Model of Software Development
When to use the Evolutionary Model-Application?
• The evolutionary model is normally useful for very large products, where it is easier to
find modules for incremental implementation.
• Often, evolutionary model is used when the customer prefers to receive the product in
increments so that he can start using the different features as and when they are
developed rather than waiting all the time for the full product to be developed and
delivered.
• The evolutionary model is also very useful in object-oriented software development
because all the development is divided into different units.
Advantages of Evolutionary Model
• Large project: Evolutionary model is normally useful for very large products.
• User gets a chance to experiment with a partially developed software much before the
complete version of the system is released.
• Evolutionary model helps to accurately elicit user requirements during the delivery of
different versions of the software.
• The core modules get tested thoroughly, thereby reducing the chances of errors in the
core modules of the final products.
• Evolutionary model avoids the need to commit large resources in one go for
development of the system.
Other benefits include:
• Error reduction: As the version is tested with customer which reduces the error
thoroughly.
• User satisfaction: User gets satisfied and he gets the full chance of experimenting
partially developed system.
• Business benefit: Successful use of this model can benefit not only business result but
marketing and the internal operations as well.
• High quality: As you should get satisfied with every version, it produces the high quality
product.
• Low risk: There is significant reduction of risk as a versions is implemented. This risk
may be associated with : missing schedule deadline ,wrong feature sets , poor quality
etc.
• Reduction Cost: Some design issues are cheaper to resolve through experimentation
than through analysis. It reduces cost by providing structured and disciplined avenue for
experimentation.
Disadvantages of Evolutionary Model
• Difficult to divide the problem into several versions that would be acceptable to the
customer and which can be incrementally implemented and delivered.
• Several version release: Developer has to make table version which increases their
Efforts.
• Dividing software: It is difficult to "divide the software and the problems in several
versions that would be acceptable to the customer which can be implemented and
delivered incrementally.
• Uncertain nature of customer needs: A confused user has uncertainty over his
requirements, so giving him several version may change his requirement Rapidly.
• Time And Cost: As this model reduces "Time And Cost" but requirement is not gathered
correctly. It will subsequently time, cost and efforts.
• Confusion by several version: An user might get "confused by several versions of the
software. It will affect on the final product.
Thank You!
Software Engineering
Prepared by: Neha Tripathi
Spiral Model
Spiral Model
• Spiral model is one of the most important Software Development Life Cycle models,
which provides support for Risk Handling.
• Spiral model was given by Barry Boehm in 1986 .
• In its diagrammatic representation, it looks like a spiral with many loops. The exact
number of loops of the spiral is unknown and can vary from project to project. Each
loop of the spiral is called a Phase of the software development process. The exact
number of phases needed to develop the product can be varied by the project manager
depending upon the project risks. As the project manager dynamically determines the
number of phases, so the project manager has an important role to develop a product
using spiral model.
• The Radius of the spiral at any point represents the expenses(cost) of the project so far,
and the angular dimension represents the progress made so far in the current phase.
Spiral Model-Representation
Quadrants in Spiral Model
Each phase of Spiral Model is divided into four quadrants as shown in the above figure. The
functions of these four quadrants are discussed below-
• Objectives determination and identify alternative solutions: Requirements are gathered from
the customers and the objectives are identified, elaborated and analyzed at the start of every
phase. Then alternative solutions possible for the phase are proposed in this quadrant.
• Identify and resolve Risks: During the second quadrant all the possible solutions are evaluated
to select the best possible solution. Then the risks associated with that solution is identified and
the risks are resolved using the best possible strategy. At the end of this quadrant, Prototype is
built for the best possible solution.
• Develop next version of the Product: During the third quadrant, the identified features are
developed and verified through testing. At the end of the third quadrant, the next version of the
software is available.
• Review and plan for the next Phase: In the fourth quadrant, the Customers evaluate the so far
developed version of the software. In the end, planning for the next phase is started.
Risk Handling in Spiral Model
• A risk is any adverse situation that might affect the successful completion of a software
project. The most important feature of the spiral model is handling these unknown risks
after the project has started. Such risk resolutions are easier done by developing a
prototype. The spiral model supports coping up with risks by providing the scope to
build a prototype at every phase of the software development.
• Prototyping Model also support risk handling, but the risks must be identified
completely before the start of the development work of the project. But in real life
project risk may occur after the development work starts, in that case, we cannot use
Prototyping Model. In each phase of the Spiral Model, the features of the product dated
and analyzed and the risks at that point of time are identified and are resolved through
prototyping. Thus, this model is much more flexible compared to other SDLC models.
Why Spiral Model is called Meta Model ?
• The Spiral model is called as a Meta Model because it subsumes all the other SDLC
models. For example, a single loop spiral actually represents the Iterative Waterfall
Model. The spiral model incorporates the stepwise approach of the Classical Waterfall
Model. The spiral model uses the approach of Prototyping Model by building a
prototype at the start of each phase as a risk handling technique. Also, the spiral model
can be considered as supporting the evolutionary model – the iterations along the spiral
can be considered as evolutionary levels through which the complete system is built.
When to use Spiral Model-Applications?
• Risk Handling: The projects with many unknown risks that occur as the development
proceeds, in that case, Spiral Model is the best development model to follow due to the
risk analysis and risk handling at every phase.
• Good for large projects: It is recommended to use the Spiral Model in large and
complex projects.
• Flexibility in Requirements: Change requests in the Requirements at later phase can be
incorporated accurately by using this model.
• Customer Satisfaction: Customer can see the development of the product at the early
phase of the software development and thus, they habituated with the system by using
it before completion of the total product.
Disadvantages of using Spiral model:
• Complex: The Spiral Model is much more complex than other SDLC models.
• Expensive: Spiral Model is not suitable for small projects as it is expensive.
• Too much dependable on Risk Analysis: The successful completion of the project is
very much dependent on Risk Analysis. Without very highly experienced expertise, it is
going to be a failure to develop a project using this model.
• Difficulty in time management: As the number of phases is unknown at the start of the
project, so time estimation is very difficult.
Thank You!
Software Engineering
Prepared by: Neha Tripathi
SDLC- V Model
• The V-model is a type of SDLC model where process executes in a sequential manner in
V-shape.
• It is also known as Verification and Validation model.
• It is based on the association of a testing phase for each corresponding development
stage.
• Development of each step directly associated with the testing phase.
• The next phase starts only after completion of the previous phase i.e. for each
development activity, there is a testing activity corresponding to it.
V-model representation
V-Model representing the document released after each phase
that assist in corresponding testing
Continue…
• Verification: It involves static analysis technique (review) done without executing code.
It is the process of evaluation of the product development phase to find whether
specified requirements meet.
• Validation: It involves dynamic analysis technique (functional, non-functional), testing
done by executing code. Validation is the process to evaluate the software after the
completion of the development phase to determine whether software meets the
customer expectations and requirements.
• So V-Model contains Verification phases on one side of the Validation phases on the
other side. Verification and Validation phases are joined by coding phase in V-shape.
Thus it is called V-Model.
Verification Phase of V-model:
• Requirement Analysis: This phase contains detailed communication with the customer
to understand their requirements and expectations. This stage is known as Requirement
Gathering.
• System Design: This phase contains the system design and the complete hardware and
communication setup for developing product.
• Architectural Design: System design is broken down further into modules taking up
different functionalities. The data transfer and communication between the internal
modules and with the outside world (other systems) is clearly understood.
• Module Design: In this phase the system breaks down into small modules. The detailed
design of modules is specified, also known as Low-Level Design (LLD).
Validation Phase of V-model:
• Unit Testing: Unit Test Plans are developed during module design phase. These Unit
Test Plans are executed to eliminate bugs at code or unit level.
• Integration testing: After completion of unit testing Integration testing is performed. In
integration testing, the modules are integrated and the system is tested. Integration
testing is performed on the Architecture design phase. This test verifies the
communication of modules among themselves.
• System Testing: System testing test the complete application with its functionality, inter
dependency, and communication . It tests the functional and non-functional
requirements of the developed application.
• User Acceptance Testing (UAT): UAT is performed in a user environment that resembles
the production environment. UAT verifies that the delivered system meets user’s
requirement and system is ready for use in real world.
Principles of V-Model:
• It is easy to manage due to the rigidity of the model. Each phase of V-Model has specific
deliverables and a review process.
• Proactive defect tracking – that is defects are found at early stage.
When to use V-Model?
• Easy to Understand.
• Testing Methods like planning, test designing happens well before coding.
• This saves a lot of time. Hence a higher chance of success over the waterfall model.
• Avoids the downward flow of the defects.
• Works well for small plans where requirements are easily understood.
Disadvantages:
• The Rapid Application Development Model was first proposed by IBM in 1980’s.
• It is based on prototyping and iterative development with no specific planning involved.
• Using the RAD model, software product is developed in a short period of time(60-90 days).
• The critical feature of this model is the use of powerful development tools and techniques.
• In RAD model the components or functions are developed in parallel as if they were mini projects.
The developments are time boxed, delivered and then assembled into a working prototype.
• This can quickly give the customer something to see and use and to provide feedback regarding the
delivery and their requirements.
• Rapid Application Development focuses on gathering customer requirements through workshops
or focus groups, early testing of the prototypes by the customer using iterative concept, reuse of
the existing prototypes (components), continuous integration and rapid delivery.
RAD Model representation
Phases of RAD Model
• The traditional SDLC follows a rigid process models with high emphasis on requirement
analysis and gathering before the coding starts. It puts pressure on the customer to sign
off the requirements before the project starts and the customer doesn’t get the feel of
the product as there is no working build available for a long time.
• The customer may need some changes after he gets to see the software. However, the
change process is quite rigid and it may not be feasible to incorporate major changes in
the product in the traditional SDLC.
• The RAD model focuses on iterative and incremental delivery of working models to the
customer. This results in rapid delivery to the customer and customer involvement
during the complete development cycle of product reducing the risk of non-
conformance with the actual user requirements.
Thank You!
Software Engineering
Prepared by: Neha Tripathi
The Rational Unified Process (RUP) Model
RUP Model
• Inception
- Establish the business case for the system.
• Elaboration
- Develop an understanding of the problem domain and the system
architecture.
• Construction
- System design, programming and testing.
• Transition
- Deploy the system in its operating environment.
RUP Iterations
• In-phase iteration
- Each phase is iterative with results developed incrementally.
• Cross-phase iteration
- As shown by the loop in the RUP model, the whole set of phases may be
enacted incrementally.
Static workflows in the Rational Unified Process
( 9 workflows= 6 core + 3 supporting)
Effort Distribution of Activities
RUP good practice
• eXtreme Programming(XP)
• Scrum
Rapid software development
• Rapid development and delivery is now often the most important requirement for
software systems
• Businesses operate in a fast –changing requirement and it is practically impossible
to produce a set of stable software requirements
• Software has to evolve quickly to reflect changing business needs.
• Rapid software development
• Specification, design and implementation are inter-leaved
• System is developed as a series of versions with stakeholders involved in version
evaluation
• User interfaces are often developed using an IDE and graphical toolset.
Agile methods
• Dissatisfaction with the overheads involved in software design methods of the 1980s
and 1990s led to the creation of agile methods. These methods:
• Focus on the code rather than the design
• Are based on an iterative approach to software development
• Are intended to deliver working software quickly and evolve this quickly to meet
changing requirements.
• The aim of agile methods is to reduce overheads in the software process (e.g. by
limiting documentation) and to be able to respond quickly to changing requirements
without excessive rework.
Agile manifesto
• We are uncovering better ways of developing software by doing it and helping others
do it. Through this work we have come to value:
-Individuals and interactions over processes and tools
-Working software over comprehensive documentation
-Customer collaboration over contract negotiation
-Responding to change over following a plan
• That is, while there is value in the items on the right, we value the items on the left
more.
The principles of agile methods
Agile method applicability
• It can be difficult to keep the interest of customers who are involved in the process.
• Team members may be unsuited to the intense involvement that characterizes agile
methods.
• Prioritizing changes can be difficult where there are multiple stakeholders.
• Maintaining simplicity requires extra work.
• Contracts may be a problem as with other approaches to iterative development.
Plan-driven and agile development
• Plan-driven development
• A plan-driven approach to software engineering is based around separate
development stages with the outputs to be produced at each of these stages
planned in advance.
• Not necessarily waterfall model – plan-driven, incremental development is
possible
• Iteration occurs within activities.
• Agile development
• Specification, design, implementation and testing are inter-leaved and the outputs
from the development process are decided through a process of negotiation
during the software development process.
Plan-driven and agile specification
Agile Methods
• eXtreme Programming(XP)?
• Scrum ?
Thank You!
Software Engineering
Prepared by : Neha Tripathi
Agile Software Development- eXtreme Programming(XP)
• Agile methods are incremental development methods that focus on rapid development,
frequent releases of the software, reducing process overheads and producing high-
quality code. They involve the customer directly in the development process.
• The decision on whether to use an agile or a plan-driven approach to development
should depend on the type of software being developed, the capabilities of the
development team and the culture of the company developing the system.
• Extreme programming is a well-known agile method that integrates a range of good
programming practices such as frequent releases of the software, continuous
software improvement and customer participation in the development team.
eXtreme Programming(XP)
• In XP, a customer or user is part of the XP team and is responsible for making decisions
on requirements.
• User requirements are expressed as scenarios or user stories.
• These are written on cards and the development team break them down into
implementation tasks. These tasks are the basis of schedule and cost estimates.
• The customer chooses the stories for inclusion in the next release based on their
priorities and the schedule estimates.
Refactoring
• Programming team look for possible software improvements and make these
improvements even where there is no immediate need for them.
• This improves the understandability of the software and so reduces the need for
documentation.
• Changes are easier to make because the code is well-structured and clear.
• However, some changes requires architecture refactoring and this is much more
expensive.
• Example: Tidying up and renaming attributes and methods to make them easier to
understand.
Test-first development
• It supports the idea of collective ownership and responsibility for the system.
• Individuals are not held responsible for problems with the code. Instead, the team
has collective responsibility for resolving these problems.
• It acts as an informal review process because each line of code is looked at by at least
two people.
• It helps support refactoring, which is a process of software improvement.
• Where pair programming and collective ownership are used, others benefit
immediately from the refactoring so they are likely to support the process.
Thank You!
Software Engineering
Prepared by: Neha Tripathi
Agile project management-Scrum
• The Scrum approach is a general agile method but its focus is on managing iterative
development rather than specific agile practices.
• There are three phases in Scrum.
• The initial phase is an outline planning phase where you establish the general
objectives for the project and design the software architecture.
• This is followed by a series of sprint cycles, where each cycle develops an
increment of the system.
• The project closure phase wraps up the project, completes required
documentation such as system help frames and user manuals and assesses the
lessons learned from the project.
The Scrum process
The Sprint cycle
• Sprints are fixed length, normally 2–4 weeks. They correspond to the development of a
release of the system in XP.
• The starting point for planning is the product backlog, which is the list of work to be
done on the project.
• The selection phase involves all of the project team who work with the customer to
select the features and functionality to be developed during the sprint.
• Once these are agreed, the team organize themselves to develop the software. During
this stage the team is isolated from the customer and the organization, with all
communications channelled through the so-called ‘Scrum master’.
• The role of the Scrum master is to protect the development team from external
distractions.
• At the end of the sprint, the work done is reviewed and presented to stakeholders. The
next sprint cycle then begins.
Teamwork in Scrum
• The ‘Scrum master’ is a facilitator who arranges daily meetings, tracks the backlog of
work to be done, records decisions, measures progress against the backlog and
communicates with customers and management outside of the team.
• The whole team attends short daily meetings(“Stand-up meeting”) where all team
members share information, describe their progress since the last meeting, problems
that have arisen and what is planned for the following day.
• This means that everyone on the team knows what is going on and, if problems
arise, can re-plan short-term work to cope with them.
Scrum benefits
• The product is broken down into a set of manageable and understandable chunks.
• Unstable requirements do not hold up progress.
• The whole team have visibility of everything and consequently team communication is
improved.
• Customers see on-time delivery of increments and gain feedback on how the product
works.
• Trust between customers and developers is established and a positive culture is created
in which everyone expects the project to succeed.
Thank You!
Case studies
230
Insulin pump control system
231
Insulin pump hardware architecture
232
Activity model of the insulin pump
233
Essential high-level requirements
234
A patient information system for mental health
care
235
MHC-PMS
236
MHC-PMS goals
237
The organization of the MHC-PMS
238
MHC-PMS key features
Privacy
▪ It is essential that patient information is confidential and is never
disclosed to anyone apart from authorised medical staff and the
patient themselves.
Safety
▪ Some mental illnesses cause patients to become suicidal or a
danger to other people. Wherever possible, the system should
warn medical staff about potentially suicidal or dangerous
patients.
▪ The system must be available when needed otherwise safety
may be compromised and it may be impossible to prescribe the
correct medication to patients.
240
Software Engineering
Unit II
Prepared by: Neha Tripathi
Requirement Analysis and Specification
Requirement Analysis and Specification phase- An overview
• The requirements analysis and specification phase starts after the feasibility study stage
is complete and the project has been found to be financially viable and technically
feasible.
• The requirements analysis and specification phase ends when the requirements
specification document has been developed and reviewed.
• The requirements specification document is usually called as the Software
Requirements Specification (SRS) document.
• The goal of the requirements analysis and specification phase is to clearly understand
the customer requirements and to systematically organize the requirements into a
document called the Software Requirements Specification (SRS) document.
• The engineers who gather and analyze customer requirements and then write the
requirements specification document are known as System Analyst.
What is Software Requirement?
• Requirements are descriptions of the services that a software system must provide and
the constraints under which it must operate
• Requirements can range from high-level abstract statements of services or system
constraints to detailed mathematical functional specifications
• IEEE defines requirement as
(1) A condition or capability needed by a user to solve a problem or achieve an objective.
(2) A condition or capability that must be met or possessed by a system or system component to satisfy a
contract, standard, specification, or other formally imposed documents.
(3) A documented representation of a condition or capability as in (1) or (2).
• Requirements Engineering is the process of establishing the services that the customer
requires from the system and the constraints under which it is to be developed and
operated. It includes: Requirement Elicitation, Requirement Analysis, Requirement
Specification, Requirement Validation and requirement Management.
Types of Requirements
• User requirements
• Statements in natural language plus diagrams of the services the system provides
and its operational constraints.
• Written for customers.
• System requirements
• A structured document setting out detailed descriptions of the system’s functions,
services and operational constraints.
• Written as a contract between client and contractor
Note: User and system requirements are further divided into Functional and Non-
Functional requirements.
User and system requirements
Functional and Non-Functional Requirements
• Functional requirements
• Statements of services the system should provide, how the system should react to
particular inputs and how the system should behave in particular situations.
• May state what the system should not do.
• Non-functional requirements
• Constraints on the services or functions offered by the system such as timing
constraints, constraints on the development process, standards, etc.
• Often apply to the system as a whole rather than individual features or services.
• Domain requirements
• Constraints on the system from the domain of operation
• Requirements that come from the application domain of the system that reflect
the characteristics of that domain
• May be functional or non-functional
Functional requirements
• A user shall be able to search the appointments lists for all clinics.
• The system shall generate each day, for each clinic, a list of patients who are expected
to attend appointments that day.
• Each staff member using the system shall be uniquely identified by his or her 8-digit
employee number.
Non-functional requirements
• Non-functional requirements may affect the overall architecture of a system rather than
the individual components.
• For example, to ensure that performance requirements are met, you may have to organize the
system to minimize communications between components.
• A single non-functional requirement, such as a security requirement, may generate a
number of related functional requirements that define system services that are
required.
• It may also generate requirements that restrict existing requirements.
Non-functional classifications
• Product requirements
• Requirements which specify that the delivered product must behave in a
particular way e.g. execution speed, reliability, etc.
• Organisational requirements
• Requirements which are a consequence of organisational policies and procedures
e.g. process standards used, implementation requirements, etc.
• External requirements
• Requirements which arise from factors which are external to the system and its
development process e.g. interoperability requirements, legislative requirements,
etc.
Metrics for specifying non-functional requirements
(Non-functional requirements are difficult to verify. Hence, it is essential to write non-
functional requirements quantitatively, so that they can be tested. For this, non-functional
requirements metrics are used. These metrics are listed in Table.)
Thank you!
Software Engineering
Unit-II
Prepared by: Neha Tripathi
Requirement Engineering(RE) Process
Requirement Engineering
• The objective behind the feasibility study is to create the reasons for developing the
software that is acceptable to users, flexible to change and conformable to established
standards.
Types of Feasibility:
• Technical Feasibility - Technical feasibility evaluates the current technologies, which are
needed to accomplish customer requirements within the time and budget.
• Operational Feasibility - Operational feasibility assesses the range in which the required
software performs a series of levels to solve business problems and customer
requirements.
• Economic Feasibility - Economic feasibility decides whether the necessary software can
generate financial profits for an organization.
1.Requirements Elicitation and Analysis:
• After an initial feasibility study, the next stage of the requirements engineering process
is requirements elicitation and analysis.
• This is also known as the gathering of requirements. Here, requirements are identified
with the help of customers and existing systems processes, if available.
• In this activity, software engineers work with customers and system end-users to find
out about the application domain, what services the system should provide, the
required performance of the system, hardware constraints, and so on.
• Analysis of requirements starts with requirement elicitation. The requirements are
analyzed to identify inconsistencies, ambiguities, redundancies, defects, omission, etc.
We describe requirements in terms of relationships and also resolve conflicts if any.
2.Requirement Specification
• The process of writing the user and system requirements in a requirements document
known as Software requirement Specification(SRS) document.
• This activity is used to produce formal software requirement models.
• All the requirements including the functional as well as the non-functional
requirements and the constraints are specified by these models in totality.
• During specification, more knowledge about the problem may be required which can
again trigger the elicitation process.
• The models used at this stage include ER diagrams, data flow diagrams(DFDs), function
decomposition diagrams(FDDs), data dictionaries, etc.
3. Requirement Validation
• Validation: It refers to a different set of tasks that ensures that the software that has
been built is traceable to customer requirements.
If requirements are not validated, errors in the requirement definitions would
propagate to the successive stages resulting in a lot of modification and rework.
The main steps for this process include:
• The requirements should be consistent with all the other requirements i.e no two
requirements should conflict with each other.
• The requirements should be complete in every sense.
• The requirements should be practically achievable.
• Reviews, buddy checks, making test cases, etc. are some of the methods used for this.
4. Requirement Management
• After an initial feasibility study, the next stage of the requirements engineering process
is requirements elicitation and analysis.
• This is also known as the gathering of requirements. Here, requirements are identified
with the help of customers and existing systems processes, if available.
• In this activity, software engineers work with customers and system end-users to find
out about the application domain, what services the system should provide, the
required performance of the system, hardware constraints, and so on.
• Analysis of requirements starts with requirement elicitation. The requirements are
analyzed to identify inconsistencies, ambiguities, redundancies, defects, omission, etc.
We describe requirements in terms of relationships and also resolve conflicts if any.
Requirements Elicitation and Analysis-Stages
• Software engineers work with a range of system stakeholders to find out about the
application domain, the services that the system should provide, the required system
performance, hardware constraints, other systems, etc.
• Stages include:
• Requirements discovery,
• Requirements classification and organization,
• Requirements prioritization and negotiation,
• Requirements specification.
The requirements elicitation and analysis process
Process activities
• Requirements discovery
• Interacting with stakeholders to discover their requirements. Domain
requirements are also discovered at this stage.
• Requirements classification and organisation
• Groups related requirements and organises them into coherent clusters.
• Prioritisation and negotiation
• Prioritising requirements and resolving requirements conflicts.
• Requirements specification
• Requirements are documented and input into the next round of the spiral.
Requirements discovery
• The process of gathering information about the required and existing systems and
distilling the user and system requirements from this information.
• Interaction is with system stakeholders from managers to external regulators.
• Systems normally have a range of stakeholders.
Stakeholders in the MHC-PMS
• Requirements Elicitation is the process to find out the requirements for an intended software system by communicating with client, end users,
system users and others who have a stake in the software system development.
• There are various ways to discover requirements
- Interviews
- Questionnaires
- Onsite observation
- Survey
- Existing manuals and documentation
- www
- Group discussion
- Scenarios
- Use cases
- Prototyping
- Ethnography
- Brainstorming etc.
Problems of requirements elicitation
• Concise
• Structured
• Black-box view
• Conceptual integrity
• Response to undesired events
• Verifiable
• Modifiable/Maintainable
• Traceable
• Scalable
• Testable
Attributes of Bad SRS Documents
• Over-specification
• Forward references
• Wishful thinking
• Noise
Ways of writing a system requirements specification
The structure of a requirements document
Problems without a SRS document
• Without developing the SRS document, the system would not be implemented
according to customer needs.
• Software developers would not know whether what they are developing is what exactly
required by the customer.
• Without SRS document, it will be very much difficult for the maintenance engineers to
understand the functionality of the system.
• It will be very much difficult for user document writers to write the users’ manuals
properly without understanding the SRS document.
Thank You!
Software Engineering
Unit-II
Prepared by: Neha Tripathi
Software Requirement Validation
Requirement Engineering Process
• Validity. Does the system provide the functions which best support the customer’s
needs?
• Consistency. Are there any requirements conflicts?
• Completeness. Are all functions required by the customer included?
• Realism. Can the requirements be implemented given available budget and technology
• Verifiability. Can the requirements be checked?
Requirements validation techniques
• Requirements reviews
• Systematic manual analysis of the requirements.
• Prototyping
• Using an executable model of the system to check requirements.
• Test-case generation
• Developing tests for requirements to check testability.
Requirements Reviews
• Regular reviews should be held while the requirements definition is being formulated.
• Both client and contractor staff should be involved in reviews.
• Reviews may be formal (with completed documents) or informal. Good
communications between developers, customers and users can resolve problems at an
early stage.
Review checks
• Verifiability
• Is the requirement realistically testable?
• Comprehensibility
• Is the requirement properly understood?
• Traceability
• Is the origin of the requirement clearly stated?
• Adaptability
• Can the requirement be changed without a large impact on other requirements?
Software Requirement Management
Requirement Engineering Process
• The business and technical environment of the system always changes after installation.
• The people who pay for a system and the users of that system are rarely the same
people.
• Large systems usually have a diverse user community, with many users having different
requirements and priorities that may be conflicting or contradictory.
Requirements evolution
Requirements management planning
• Establishes the level of requirements management detail that is required.
• Requirements management decisions:
• Requirements identification Each requirement must be uniquely identified so that
it can be cross-referenced with other requirements.
• A change management process This is the set of activities that assess the impact
and cost of changes. I discuss this process in more detail in the following section.
• Traceability policies These policies define the relationships between each
requirement and between the requirements and the system design that should be
recorded.
• Tool support Tools that may be used range from specialist requirements
management systems to spreadsheets and simple database systems.
• Deciding if a requirements change should be accepted
• Problem analysis and change specification
• During this stage, the problem or the change proposal is analyzed to check
that it is valid. This analysis is fed back to the change requestor who may
respond with a more specific requirements change proposal, or decide to
withdraw the request.
• Change analysis and costing
• The effect of the proposed change is assessed using traceability information
and general knowledge of the system requirements. Once this analysis is
completed, a decision is made whether or not to proceed with the
requirements change.
• Change implementation
• The requirements document and, where necessary, the system design and
implementation, are modified. Ideally, the document should be organized so
that changes can be easily implemented.
Requirements Change Management
Thank You!
Software Engineering
Unit-II
Prepared by: Neha Tripathi
Analysis Tools
• Structured Analysis Tools: DFDs, Data dictionary, Decision Tree, Decision Table, ERDs
etc.
• Structured Design Tools: Structured chart/Module dependency Graph
Structured Analysis/ Structured design (SA/SD)
• Structured analysis is used to carry out the top-down decomposition of a set of high-
level functions depicted in the problem description and to represent them graphically.
During structured analysis, functional decomposition of the system is achieved. That is,
each function that the system performs is analyzed and hierarchically decomposed into
more detailed functions.
• Structured analysis technique is based on the following essential underlying principles:
• The DFD (also known as a bubble chart) is a hierarchical graphical model of a system
that shows the different processing activities or functions that the system performs and
the data interchange among these functions.
• Each function is considered as a processing station (or process) that consumes some
input data and produces some output data.
• The system is represented in terms of the input data to the system, various processing
carried out on these data, and the output data generated by the system.
• A DFD model uses a very limited number of primitive symbols to represent the
functions performed by a system and the data flow among these functions.
Primitive symbols used for constructing DFDs
Important concepts associated with constructing DFD models
• A DFD model of a system graphically represents how each input data is transformed to
its corresponding output data through a hierarchy of DFDs.
• The DFD model of a problem consists of many DFDs and a single data dictionary.
• The DFD model of a system i s constructed by using a hierarchy of DFDs called as Levels.
Levels of DFD
• 0-Level/Context DFD:
The context diagram is the most abstract (highest level) data flow representation of a system. It represents the
entire system as a single bubble. It establishes the context in which the system operates; that is, who are the
users, what data do they input to the system, and what data they received by the system.
• 1-Level DFD:
The level 1 DFD usually contains three to seven bubbles. That is, the system is represented as performing three
to seven important functions. To develop the level 1 DFD, examine the high-level functional requirements in
the SRS document.
• 2-Level/Detailed DFD:
The level 2 DFD is made for those bubbles in level 1 DFD whose details /decomposition is possible.
Rules for constructing DFD systematically in Levels:
• A software system called RMS calculating software would read three integral numbers
from the user in the range of –1000 and +1000 and would determine the root mean
square (RMS)of the three input numbers and display it.
• 0-Level/Context DFD:
• 1-Level DFD:
• 2-Level/Detailed DFD
Shortcomings of the DFD model
• The aim of structured design is to transform the results of the structured analysis (that
is, the DFD model) into a structure chart.
• A structure chart represents the software architecture.
• The various modules making up the system, the module dependency (i.e. which module
calls which other modules), and the parameters that are passed among the different
modules.
• The structure chart representation can be easily implemented using some programming
language.
Notations Used:
• By observing the level 1 DFD, we can identify validate-input as the afferent branch and
write-output as the efferent branch. The remaining (i.e., compute-rms) as the central
transform.
• By applying the step 2 and step 3 of transform analysis, we get the structure chart
Transaction analysis
• As in transform analysis, first all data entering into the DFD need to be identified.
• In a transaction-driven system, different data items may pass through different computation
paths through the DFD. This is in contrast to a transform centered system where each data item
entering the DFD goes through the same processing steps.
• Each different way in which input data is processed is a transaction.
• A simple way to identify a transaction is the following. Check the input data. The number of
bubbles on which the input data to the DFD are incident defines the number of transactions.
However, some transactions may not require any input data. These transactions can be
identified based on the experience gained from solving a large number of examples.
• For each identified transaction, trace the input data to the output. All the traversed bubbles
belong to the transaction. These bubbles should be mapped to the same module on the
structure chart.
• In the structure chart, draw a root module and below this module draw each identified
transaction as a module.
• Every transaction carries a tag identifying its type. Transaction analysis uses this tag to divide the
system into transaction modules and a transaction-center module.
Thank You!
Software Engineering
Unit-II
Prepared by:Neha Tripathi
Analysis Tools
• A data dictionary provides a standard terminology for all relevant data for use by the
developers working in a project. A consistent vocabulary for data items is very important,
since in large projects different developers of the project have a tendency to use
different terms to refer to the same data, which unnecessarily causes confusion.
• The data dictionary helps the developers to determine the definition of different data
structures in terms of their component elements while implementing the design.
• The data dictionary helps to perform impact analysis. That is, it is possible to determine
the effect of some data on various processing activities and vice versa. Such impact
analysis is especially useful when one wants to check the impact of changing an input
value type, or a bug in some functionality, etc.
Tool support
• For large systems, the data dictionary can become extremely complex and
voluminous. Even moderate-sized projects can have thousands of entries in the
data dictionary. It becomes extremely difficult to maintain a voluminous
dictionary manually.
• Computer-aided software engineering (CASE) tools come handy to overcome
this problem. Most CASE tools usually capture the data items appearing in a DFD
as the DFD is drawn, and automatically generate the data dictionary.
• As a result, the designers do not have to spend almost any effort in creating the
data dictionary.
• These CASE tools also support some query language facility to query about the
definition and usage of data items.
• For example, queries may be formulated to determine which data item affects
which processes, or a process affects which data items, or the definition and
usage of specific data items, etc.
• Query handling is facilitated by storing the data dictionary in a relational database
management system (RDBMS).
Data definition
Composite data items can be defined in terms of primitive data items using the following
data definition operators.
• +: denotes composition of two data items, e.g. a+b represents data a and b.
• [,,]: represents selection, i.e. any one of the data items listed inside the square bracket
can occur For example, [a,b] represents either a occurs o r b occurs.
• (): the contents inside the bracket represent optional data which may or may not
appear. a+(b) represents either a or a+b occurs.
• {}: represents iterative data definition, e.g. {name}5 represents five name data. {name}*
represents zero or more instances of name data.
• =: represents equivalence, e.g. a=b+c means that a is a composite data item comprising
of both b and c.
• /* */: Anything appearing within /* and */ is considered as comment.
Decision Tree
• A decision tree gives a graphic view of the processing logic involved in decision making
and the corresponding actions taken.
• It is a graphical technique representing decisions using a series of nodes and branches
• Each node is a decision point - a choice has to be made
• Each branch has a corresponding value to the decision choice
• Subsequent action is the result
Example of Decision Tree
Decision Tables
• Name the conditions and the values each condition can assume
• Name all possible actions that can occur
• List all possible rules
• Define the actions for each rule
• Simplify the decision table
Simplified Decision Table
Decision table versus decision tree
Even though both decision tables and decision trees can be used to represent
complex program logic, they can be distinguishable on the following three
considerations:
• Readability: Decision trees are easier to read and understand when the number
of conditions are small. On the other hand, a decision table causes the analyst to
look at every possible combination of conditions which he might otherwise omit.
• Explicit representation of the order of decision making: In contrast to the decision
trees, the order of decision making is abstracted out in decision tables. A
situation where decision tree is more useful is when multilevel decision making is
required. Decision trees can more intuitively represent multilevel decision
making hierarchically, whereas decision tables can only represent a single
decision to select the appropriate action for execution.
• Representing complex decision logic: Decision trees become very complex to
understand when the number of conditions and actions increase. It may even be
difficult to draw the tree on a single page. When very large number of decisions
are involved, the decision table representation may be preferred.
Thank You!