Unit 1 - SSD
Unit 1 - SSD
SRS Design
Document Design Documents
Activities
Definition: Transforming user requirements into a form suitable for coding and implementation.
Role in SDLC: First step in Software Design Life Cycle (SDLC), moving focus from problem domain to solution
domain.
An analysis technique helps elaborate the customer requirements through careful thinking:
And at the same time consciously avoids making any decisions regarding implementation.
The design model is obtained from the analysis model through transformations over a series of steps:
2
TYPES
HIGH-LEVEL DESIGN DETAILED DESIGN (LOW LEVEL)
The outcome of high-level design:
For each module, design:
Program structure (or software architecture).
Data structure
Several notations are available to represent high-level
design: Algorithms
3
GOOD AND BAD DESIGNS
There is no unique way to design a system.
Completeness: Includes all components like data structures, modules, and interfaces.
5
PROBLEM PARTITIONING (DECOMPOSITION)
Definition: Breaking a large problem into smaller, manageable A popular way to demonstrate the
pieces. decomposition principle: Try to
break a bunch of sticks tied
The small parts are then taken up one by one and solved separately
together versus breaking them
(Divide and Conquer).
individually.
The idea is that each small part would be easy to grasp and can be
Example use of decomposition
easily solved.
principle: You understand a book
The full problem is solved when all the parts are solved. better when the contents are
organized into independent
Benefits: Easier understanding, testing, modification, and expansion.
chapters compared to when
Complexity: Increased partitions can increase cost and complexity. everything is mixed up.
6
BASICS:
ABSTRACTION Simplify a problem by omitting unnecessary
details: Focus attention on only one aspect
Functional Abstraction: Focus on the method without internal details. of the problem and ignore irrelevant details.
Data Abstraction: Hides data details, forming the basis for Object-Oriented Suppose you are asked to develop an
Design.
overall understanding of some country.
A module is unaware (how to invoke etc.) of the higher level modules. No one in his right mind would meet all
the citizens of the country, visit every
Lower-level modules: Do input/output and other low-level functions.
house, and examine every tree of the
Upper-level modules: Do more managerial functions. country, etc.
You would possibly refer to various
The principle of abstraction requires: types of maps for that country.
Lower-level modules do not invoke functions of higher level modules. A map, in fact, is an abstract representation
Also known as layered design. of a country.
7
Abstraction and Decomposition Principles are Used in Design D1 ..
in two principal ways: D2 .. Data
D3 ..
Modular Design F1 .. Functions
Layered Design F2 ..
F3 ..
F4 ..
F5 ..
MODULARITY
A module consists of:
Several functions
Associated data structures.
8
MODULAR DESIGN LAYERED DESIGN
Fan Fan
out=2 in=0
Fan Fan
out=1 in=1
Fan
in=2
If modules are independent: They can be understood separately
=> Reduces the complexity.
To understand why this is so, Remember that it is very difficult to Neat arrangement of modules in a hierarchy
break a bunch of sticks but very easy to break the sticks means:
individually. Low fan-out
9
Modules should display: COHESION AND COUPLING
High cohesion
Low coupling.
10
DESIGN APPROACHES
Two fundamentally different software design approaches:
Function-oriented design
Object-oriented design
12
FUNCTION-ORIENTED DESIGN - DESIGN PROCESS
13
FUNCTION-ORIENTED DESIGN - DESIGN NOTATIONS
14
OBJECT-ORIENTED DESIGN - OVERVIEW AND CHARACTERISTICS
15
OBJECT-ORIENTED DESIGN - IMPORTANT CONCEPTS
• Classes: Blueprints for objects With its own data and functions.
• Inheritance, Polymorphism, Encapsulation Cannot directly refer to or change data of other objects.
16
Objects have their own internal data that defines their state.
In OOD: Software is not developed by designing functions OBJECT-ORIENTED VERSUS FUNCTION ORIENTED DESIGN
such as:
Unlike function-oriented design,
update-employee-record,
In OOD the basic abstraction is not functions
get-employee-address, etc.
such as “sort”, “display”, “track”, etc.,
But by designing objects such as:
But real-world entities such as “employee”,
employees, “picture”, “machine”, “radar system”, etc.
departments, etc.
17
SOFTWARE DEVELOPMENT LIFE CYCLE (SDLC)
Definition of SDLC:
identifies all the activities required for product Requirements analysis and specification,
development, Design,
establishes a precedence ordering among the different Coding,
activities,
Testing
Divides life cycle into phases.
Maintenance. 18
The development team must identify a suitable life cycle model and then adhere to it.
Primary advantage of adhering to a life cycle model is that it helps development of software in a systematic
and disciplined manner.
When a program is developed by a single programmer : He/she has the freedom to decide the exact steps.
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.
E.g. 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.
19
Many life cycle models have been proposed.
Iterative waterfall,
Evolutionary,
Prototyping, and
Spiral model
20
CLASSICAL WATERFALL MODEL
Feasibility Study
Maintenance
21
DESIGN PHASE
Design phase transforms requirements specification into a form suitable for implementation
in some programming language.
In technical terms: during design phase, software architecture is derived from the SRS
document.
Two design approaches: traditional approach & object oriented approach.
For example, the objects in a pay-roll software may be: employees, managers,
pay-roll register, Departments, etc.
better maintainability.
23
ITERATIVE WATERFALL MODEL
Classical waterfall model is idealistic AS IT assumes that no
defect is introduced during any development activity. Feasibility Study
in practice: defects do get introduced in almost every phase
of the life cycle. Req. Analysis
Characteristics: Testing
More flexible than Classical Waterfall
Maintenance
Suitable for projects with evolving requirements
24
PROTOTYPING MODEL
Characteristics:
Maintain
Allows users to visualize the product early
Evolutionary model (aka successive versions or incremental model): The system is broken
down into several modules which can be incrementally implemented and delivered.
First develop the core modules of the system.
The initial product skeleton is refined into increasing levels of capability by adding new
functionalities in successive versions.
Overview of Evolutionary Model: C
• Develops the system incrementally
26
SPIRAL MODEL
Proposed by Boehm in 1988.
Low Level:
Data structures of individual modules,
Algorithms for individual modules.
28