You are on page 1of 71

Software Engineering

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 1
Objectives

ƒTo understand the softeware engineering discipline and


the structured approach of solving a problem
ƒTo gather an idea of various models and their usage
ƒTo have an in-depth study of various phases of SDLC

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 2
Agenda
(00:30) Introduction to Software Development Process
(00:45) Different Phases of SDLC
(00:45) Various Models
(00:15) Break
(00:45) System Decomposition – Different Levels of DFD
(01:30) Data Modeling – Normalization ERD
(01:00) Lunch Break
(00:30) Quality Attributes
(00:15) Testing – Introduction.
(00:15) Types: Static & Dynamic Testing.
(00:20) Black Box Testing,White Box Testing- Basis Path Testing
(00:20) Levels of Testing- Unit, Integration, System, Acceptance Testing
(00:15) Break
(01:30) Activities – Case study work outs

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 3
What is a Software ?

ƒIs it a collection of computer programs and associated


documents ?

ƒIs it an Information transformer which produces,


manages, acquires, modifies or displays information ?

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 4
SOFTWARE ENGINEERING

ƒ Software Engineering is a systematic approach to


ƒ Development,

ƒ Operation,

ƒ Maintenance and retirement of software.

ƒ Establishment and use of sound engineering principles


in order to obtain economical software that is reliable
and efficient.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 5
Software Product - Features

ƒ Extensive documentation

ƒ Detailed testing

ƒ Third party maintenance

ƒ Team effort

ƒ Conformance to standards

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 6
Software Product - Features
(contd…)

ƒ Usage of tools

ƒ Quality assurance

ƒ Project management

ƒ Risk management

ƒ Change management

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 7
SOFTWARE DEVELOPMENT
PROCESS (SDP)

A process of transforming user needs into an effective


software solution

User needs Effective s/w solution


SDP

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 8
NEED FOR SDP:

ƒ Helps organize complex job

ƒ To achieve a task in ordered manner

ƒ Provides visibility and clarity

ƒ Helps accomplishing task by assigning

responsibilities

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 9
SOFTWARE LIFE CYCLE MODEL

ƒ A life cycle model represents all the activities required


to make a software product transit through its life cycle
phases.

ƒ It also captures the order in which these activities are


to be undertaken.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 10
NEED FOR SDLC MODEL

ƒ SDLC defines entry and exit criteria for every


phase.

ƒ Becomes difficult for software project managers to


monitor the progress of the project.

ƒ Product would not be in a systematic and disciplined


manner.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 11
PHASES INVOLVED IN
THE SDLC

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 12
SDLC PHASES….

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 13
REQUIREMENT ANALYSIS
The aim of the requirements analysis phase is to understand

the exact requirements of the customer and to document

them properly.

This phase consists of two distinct activities,


ƒ Requirements gathering and analysis.

ƒ Requirements specification(SRS)

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 14
Some basic questions for problem analysis…
ƒ What is the problem?

ƒ Why is it important to solve the problem?

ƒ What are the possible solutions to the problem?

ƒ What exactly are the data input to the system and


what exactly are the data output by the system?

ƒ What are the likely complexities that might arise


while solving the problem?

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 15
TYPES OF REQUIREMENTS

ƒ Functional requirements
Those requirements that is explicitly stated and has
to be met by the software developed.

Ex: The software must have a response time of less


than 5 seconds

ƒ Non functional requirements

The attributes which enriches the quality of the


overall system.
Ex: The system should be portable
Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 16
Software Requirement Specification Document
(SRS)
The customer requirements identified during the requirements

gathering and analysis activity are organized into a SRS

document.

The important parts of SRS document are

ƒ Functional requirements of the system

ƒ Non-functional requirements of the system

ƒ Goals of implementation

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 17
PROPERTIES OF A GOOD SRS

ƒ Unambiguous

ƒ Consistent

ƒ Complete

ƒ Structured (easy to modify)

ƒ Response to undesired events.

ƒ Verifiable.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 18
DESIGN
ƒ The process of defining the architecture , interface,

component and other characteristics of a system.

ƒ Software design deals with transforming the


customer requirements, into a form (a set of
documents) that is suitable for implementation in a
programming language.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 19
Analysis Vs Design

ƒ The aim of analysis is to understand the problem


with a view to eliminate any deficiencies in the
requirement specification such as incompleteness,
inconsistencies, etc.

ƒ The aim of design is to produce a model that will


provide a seamless transition to the coding phase.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 20
Levels of Design

ƒ High level design (or Preliminary)


ƒ Low level design

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 21
Architectural Design
ƒ Defines the relationship between major structural
elements of the software.
ƒ Helps to develop a modular program structure and
represent the control relationship between modules.

Eg: Structure chart

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 22
Data Design

ƒ Is a process of gradual refinement of data,


by which application's data access is fast, easily
maintained, and can gracefully accept future
data enhancements

Ex. Normalization

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 23
Procedural and Interface Design

PROCEDURAL DESIGN:
The pseudo codes,algorithms,flow charts which are required to
represent the logic for each and every individual module are
prepared.

INTERFACE DESIGN:
This is basically used to design how to input data to the system
and display the information from the system.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 24
MEASURES OF GOOD DESIGN

Good software design implies decomposition of


the problem into modules and the arrangement of these
modules in a hierarchy.

This can be measured through


- COUPLING
- COHESION

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 25
Coupling

ƒ Coupling is a measure of interdependence or


interconnection between the two modules.

ƒ Coupling depends on the interface complexity between


modules.

ƒ Coupling should always be low to reduce the ripple


effect b/w modules

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 26
DESIGN (contd..)
A visual representation of

(a) (b)

high coupling low coupling


Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 27
Cohesion

ƒ Cohesion is a measure of functional strength of a module.


ƒ Cohesion refers to interdependency in a module.

ƒ Cohesion should be high to specify only related functions


are kept inside a module.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 28
TESTING

ƒ We need to test a program to demonstrate the


existence of a fault.

ƒ Testing is the process of executing the program with


the intent of finding errors.

ƒ Testing has to be done efficiently – discover all


possible errors with minimum resources.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 29
TESTING
Testing is the process of executing the program with
the intent of finding errors

VERIFICATION
Are we building the product right.

VALIDATION

Are we built the right product

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 30
Types of Testing

Static Testing
Reviews,inspections, walkthroughs are some of the
techniques used.

Dynamic Testing
In dynamic testing the source code has to be executed and
tested with the test case

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 31
Testing Approaches

Black-box (or) Functional Testing


Testing the software without the knowledge of the
internal workings.

White-box (or) Structural Testing


Testing the software with the knowledge of the
internal workings.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 32
Black Box Testing - Advantages

ƒ Knowledge of implementation is not necessary

ƒ Tester and programmer are independent of each other

ƒ Tests done from user's point of view

ƒ Test cases can be designed as soon as the specifications are

complete

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 33
White Box Testing - Advantages
ƒ Used to identify infeasible path
ƒ Code optimization

ƒ Knowledge of internal code helps to identify the input type for


testing application efficiently

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 34
Test Case Generation - Methods

ƒ Equivalence Class Partitioning


ƒ Boundary Value Analysis

ƒ Cause Effect Analysis

ƒ Cause Effect Graphing

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 35
Levels of Testing
Unit Testing :
Testing each and every individual
module for its correctness by using
test cases and unit test specification(UTS).

Integration Testing:
Integration testing is the process of
assembling modules to check whether the
dependent modules are interacting properly or not.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 36
Types of Integration Testing

ƒ Top-down Approach - Begins with the topmost module.

ƒ Bottom-up Approach-Begins with elementary modules.

ƒ Big Bang Approach- Test each module individually and linking all these
modules together only when every module in the system has been tested.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 37
System Testing

System Testing - ensures that the system does what the


customer wants it to do. It uses system test specification(STS) .

The following are tested in system testing:


Functional requirements.
Non Functional requirements
Stress testing
Recovery testing........

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 38
Acceptance Testing
Acceptance Testing - customer evaluation of the system

Levels of acceptance testing:


ƒ Alpha Testing-done at developers end.
ƒ Beta Testing-done in clients environment
ƒ Pilot Testing-the system is installed on an
experimental basis

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 39
MODELS OF SDLC

Various standard models of SDLC:

ƒ Waterfall Model

ƒ Prototyping

ƒ Spiral Model

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 40
WATERFALL MODEL

„ Proposed Winston Royce in 1970

„ Sequential model

„ Systematic approach

„ Can’t retrieve to previous phase

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 41
WATERFALL MODEL

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 42
WATERFALL MODEL
(contd..)
ADVANTAGES
ƒ Linear approach
ƒ Equivalent importance to all the phases
ƒ Contract Related issues can be addressed

DISADVANTAGES
ƒ Not used in practical development projects
ƒ Output will be viewed at last stage
ƒ Late-risk resolution
ƒ Blocking of states

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 43
PROTOTYPE

„ A prototype is a toy implementation of the system.

„ Prototype usually exhibits:


ƒ Limited functional capabilities
ƒ Low reliability
ƒ Inefficient performance

„ Compared to the actual software

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 44
PROTOTYPE (contd..)
Valuable mechanism for gaining better understanding of the
customer’s needs
ƒ how the screens might look like
ƒ how the user interface would behave
ƒ how the system would produce outputs

TYPES
ƒ Throw-Away
ƒ Evolutionary

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 45
THROW-AWAY PROTOTYPE

ƒ Quick and dirty.


ƒ Quick requirements assessment, analysis, design.
ƒ Focus on rapid construction.
ƒ Ad-hoc development approach.
ƒ Discard prototype after objective is met.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 46
EVOLUTIONARY PROTOTYPE

„ Build the software incrementally.

„ Adopt a rigorous, systematic approach.

„ Iterative model.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 47
SPIRAL MODEL
„ Proposed by Barry Boehm in 1986.

„ Diagrammatic representation of this model appears


like a spiral with many loops.

„ Suitable for technically challenging software


products that are prone to several kinds of risks.

„ Accommodates prototyping.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 48
SPIRAL MODEL (contd..)
Determine Evaluate
objectives, alternatives,
alternatives, Ri identify, resolve
constraints sk risks Prototype

Develop, verify next-


Plan next phase
level product

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 49
APPLICATION SITUATIONS

Waterfall model - Requirements are clear and stable.

Prototype
Throw away - Requirements are not clear
Evolutionary - Requirements are unstable
(keeps changing).

Spiral Model - Risk involved.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 50
SYSTEM DECOMPOSITION

Divide the complex system into modules,which represents the


functionalities of the system. so that the module will become
more simple and manageable – DIVIDE AND CONQUER.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 51
SYSTEM DECOMPOSITION

The process modelling is used to


represent the system decomposition.

Components of process modelling:


Data Flow Diagram
Data Dictionary

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 52
DATA FLOW DIAGRAM

Depicts how the information flows through the


processes and their storage

Used to describe how the system transforms inputs


into specific outputs.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 53
COMPONENTS OF DFD

EXTERNAL ENTITIES (or) EXTERNAL AGENT

DATA FLOWS

DATA STORES

PROCESS

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 54
LEVELS OF DFD
DFD has an levelled approach- TOP-DOWN.
Level 0 – Represents the scope and environment of the
system(context).System is considered as a single process.
Level 1- The system is broken into its major
functionalities,each as a individual process.
Level 2- Decompose the major functionalities into sub
functionalities. Deals with each process in detailed.
No standard limit for number of levels in a DFD.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 55
DATA MODELLING

Data model helps to identify the data objects to be processed


by the system and the attributes that describes the object.

It also helps to identify the relationship between each object


and other object
e.g: - E-R diagram

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 56
E-R DIAGRAM

Widely used conceptual level data model


Components

ƒ Entity
ƒ Attributes
ƒ Relationship

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 57
Entity

Collection of similar objects that share the common


attributes..

Employee
Jack (Instance1)
Jim ( Instance2)

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 58
Attributes

Attributes
Each entity is described by a set of attributes/properties

NAME

e.g:Empid,Ename,Eaddress (Attributes of Employee)

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 59
Relationships
Relationships
When two or more entities are associated with each
other, we have an instance of a Relationship.
Mentioned by straight line -Relationship name

Types of relationship
- Cardinality
- Optionality

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 60
PROBLEMS WITH INCOREECT DB DESIGN

ƒ Redundant Storage of Data


ƒ Insertion Anomaly
ƒ Deletion Anomaly
ƒ Update Anomaly

TO Minimize This
-NORMALIZATION

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 61
NORMALIZATON

1st normal form


-eliminating repeating groups
-primary key from the non-repeating group to the
repeating group which forms the composite key

2nd normal form


eliminating partial functional dependency

3rd normal form


eliminating transitive dependency

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 62
NORMALIZATON

Example for Normalization-One Student can take many


courses,Cost depends on the duration of the course
Stud Stud Course Course Name Duration Cost Grade
Id Name Id (Months)

101 Vijay 301 Java 2 50000 A

102 Kishore 304 C 4 60000 C

101 Vijay 302 C++ 4 60000 B

104 Vipin 303 . Net 2 50000 A

105 Sachin 305 J2EE 2 50000 O

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 63
1st Normal Form

R - Relation
R(Stud Id, Stud Name,Course Id,Course Name,Duration,Cost,Grade)

1st normal form:


R1(Stud Id, Stud Name)
R2(Course Id,Stud Id, Course Name, Duration, Cost, Grade)

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 64
2nd Normal Form
2nd normal form:
R1(Same)
R21(Course Id, Course Name, Duration,Cost)
R22(Course Id, Stud Id, Grade)

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 65
3rd Normal Form

3rd normal form:


R1(Same),R22(Same)
R211(Course Id,Course Name,Duration *)
R212(Duration *,Cost)

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 66
QUALITIES OF GOOD
SOFTWARE
ƒ Correctness
ƒ If there is no difference between what the software is
expected to do and what it does, the software is correct.
ƒ Correctness is absolute.

ƒ Usability
ƒ The measure of how friendly the software is to users.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 67
QUALITIES OF GOOD
SOFTWARE (contd…)
ƒ Robustness
ƒ The capability to function acceptably in abnormal
circumstances.
ƒ Abnormal circumstances could be excess load, failure of
some parts.

ƒ Portability
ƒ Ability to use software across different hardware and
software environments.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 68
QUALITIES OF GOOD
SOFTWARE (contd…)

ƒ Reliability
ƒ The capability of functioning correctly considering some
criteria.

„ The criteria could be , for example


ƒ Period of operational availability.
ƒ Accuracy of output or operations.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 69
QUALITIES OF GOOD
SOFTWARE (contd…)

„ Maintainability

ƒ The ability to correct, refine and adapt with minimal


resource expenditure.

ƒ Efficiency
ƒ Optimal use of available resources.

Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 70
In Summary…
Software Development Process
Different Phases of SDLC
Models – Waterfall, Prototype, Spiral
Process Modelling - DFD
Data Modelling –ERD, Normalization
Quality Attributes
Testing - Static & Dynamic Testing.
Black Box Testing, White Box Testing- Basis Path Testing
Levels of Testing- Unit, Integration, System, Acceptance
Testing
Teknoturf Info Services Pvt. Ltd. | © Copyright 2008 (Do not redistribute or reuse) Slide# 71

You might also like