LECTURE -2
SOFTWARE ENGINEERING
SOFTWARE CRISIS AND EMERGENCE OF SOFTWARE ENGINEERING
Prof. D. S. Yadav
Department of Computer Science 1
South Asian University, New Delhi
SOFTWARE CRISIS
Software products:
Fail to meet user requirements.
Frequently crash.
Expensive.
Difficult to alter, debug, and enhance.
Difficult
Often delivered late.
Use resources non-optimally.
2
SOFTWARE CRISIS (CONT.)
Hw cost
Sw cost
1960 Year
2008
Relative Cost of Hardware and Software
3
FACTORS CONTRIBUTING TO THE SOFTWARE CRISIS
Larger problems,
Lack of adequate training in software
engineering,
Increasing skill shortage,
Low productivity improvements.
4
PROGRAMS VS SOFTWARE PRODUCTS
Usually small in size Large
Author himself is sole user Large number of users
Single developer Team of developers
Lacks proper user
interface Well-designed interface
Lacks proper Well documented & user-
documentation manual prepared
Ad hoc development. Systematic development
5
TYPES OF SOFTWARE PROJECTS
Software products
Outsourced projects
Indian companies have focused on outsourced
projects.
6
COMPUTER SYSTEMS ENGINEERING
Computer systems engineering:
encompasses software engineering.
Many products require development of software as
well as specific hardware to run it:
a coffee vending machine,
a mobile communication product, etc.
a Lift carrying passengers
Air Traffic Controller
MCU for passenger cars
7
COMPUTER SYSTEMS ENGINEERING
The high-level problem:
Deciding which tasks are to be solved by
software.
Which ones by hardware.
Often, hardware and software are developed
together:
Hardware simulator is used during software
development.
Integration of hardware and software.
Final system testing
8
COMPUTER SYSTEMS ENGINEERING (CONT.)
Feasibility
Study
Requirements
Analysis and
Hardware
Specification
Development
Hardware
Software
Partitioning Software
Development Integration
and Testing
Project Management
9
EVOLUTION OF DESIGN TECHNIQUES
Object-Oriented
Data flow-based
Data structure-
based
Control flow-
based
Ad hoc
10
EMERGENCE OF SOFTWARE ENGINEERING
Early Computer Programming (1950s):
Programs were being written in assembly language.
Programs were limited to about a few hundreds of
lines of assembly code.
Every programmer developed his own style of writing
programs:
According to his intuition (exploratory programming).
11
High-Level Language Programming (Early 60s)
● HIGH-LEVEL LANGUAGES SUCH AS FORTRAN, ALGOL,
AND COBOL WERE INTRODUCED:
– This reduced software development efforts greatly.
● SOFTWARE DEVELOPMENT STYLE WAS STILL
EXPLORATORY.
– Typical program sizes were limited to a few
thousands of lines of source code.
12
MOTIVATION FACTORS FOR
CONTROL FLOW-BASED DESIGN (LATE 60S)
Size and complexity of programs increased further:
o Exploratory programming style proved to be
insufficient.
Programmers found:
o Very difficult to write cost-effective and correct
programs.
Programmers found:
o programs written by others very difficult to
understand and maintain.
To cope up with this problem, experienced programmers
advised:
Pay particular attention to the design of
13
the Program's control structure.
CONTROL FLOW-BASED DESIGN (LATE 60S)
A program's control structure indicates:
The sequence in which the program's instructions are
executed.
To help design programs having good control structure:
Flow charting technique was developed.
Using flow charting technique:
One can represent and design a program's control structure.
Usually one understands a program:
By mentally simulating the program's execution
sequence.
14
CONTROL FLOW-BASED DESIGN (LATE 60S)
A program having a messy flow chart representation:
Difficult to understand and debug.
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.
Many programmers had extensively used assembly languages.
JUMP instructions are frequently used for program branching in
assembly languages.
Programmers considered use of GO TO statements inevitable
At that time, Dijkstra published his article:
“Goto Statement Considered Harmful” Comm. of ACM, 1969.
Many programmers were unhappy to read his article.
15
CONTROL FLOW-BASED DESIGN (LATE 60S)
They published several counter articles:
Highlighting the advantages and inevitability of GO TO statements.
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.
16
STRUCTURED PROGRAMMING
A program is called structured :
When it uses only the following types of constructs:
sequence,
selection,
Iteration
In the Structured Programs :
Unstructured control flows are avoided.
Consist of a neat set of modules.
Use single-entry, single-exit program constructs
However, violations to this feature are permitted:
– Due to practical considerations such as:
● Premature loop exit to support exception handling. 17
STRUCTURED PROGRAMS
Structured programs are:
Easier to read and understand,
Easier to maintain,
Require less effort and time for development.
Research experience shows:
Programmers commit less number of errors:
While using structured if-then-else and do-while statements.
Compared to test-and-branch constructs.
Soon it was discovered:
It is important to pay more attention to the design of data structures
18
of a program than to the design of its control structure.
DATA STRUCTURE-ORIENTED DESIGN (EARLY 70S)
Techniques which emphasize designing the data structure:
Derive program structure from it:
Are called data structure-oriented design
techniques.
Example of data structure-oriented design technique:
Jackson's Structured Programming(JSP) methodology
Developed by Michael Jackson in 1970s
JSP technique:
– Program code structure should correspond to the data structure.
19
Data Structure Oriented Design (Early 70s)
IN JSP METHODOLOGY:
– A program's data structures are first designed using notations for
● sequence, selection, and iteration.
– Then data structure design is used :
● To derive the program structure
SEVERAL OTHER DATA STRUCTURE-ORIENTED METHODOLOGIES
ALSO EXIST:
– e.g., Warnier-Orr Methodology.
20
DATA FLOW-ORIENTED DESIGN (LATE 70S)
Data flow-oriented techniques advocate:
The data items input to a system must first be identified,
Processing required on the data items to produce the required
outputs should be determined.
Data flow technique identifies:
Different processing stations (functions) in a system.
The items (data) that flow between processing stations
Data flow technique is a generic technique:
Can be used to model the working of any system.
not just software systems.
A major advantage of the data flow technique is its simplicity.
21
DATA FLOW MODEL OF A CAR ASSEMBLY UNIT
Engine Store Door Store
Partly
Chassis with Assembled
Engine Car
Fit Fit Fit Paint and Car
Engine Doors Wheels Assembled Test
Car
Chassis Store Wheel Store
22
OBJECT-ORIENTED DESIGN (80S)
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 23
EVOLUTION OF DESIGN TECHNIQUES
Object-Oriented
Data flow-based
Data structure-
based
Control flow-
based
Ad hoc
24
25