TCS 2411 Software Engineering
Download
Report
Transcript TCS 2411 Software Engineering
Software Design Notations
“Documenting the software blueprint”
TCS2411 Software Engineering
1
Lecture Objectives
To describe the tasks in producing and
document the software design
To understand the systematic approach in
producing the different levels of the software
design
To illustrate the different notations that can be
used to draw the design
TCS2411 Software Engineering
2
Software Design
Next milestone, due on Week 9
Data design
Database/File design
Data structure design
Architecture design
Interface design
Screen design
Report design
Procedural design
TCS2411 Software Engineering
3
Design Model
Procedural
design
Interface
design
Architectural design
Data design
TCS2411 Software Engineering
4
Data Design
Select logical representations of data objects
(data structures) identified during
requirements definition and specification
Well-designed data can lead to better program
structure and modularity, and reduced
procedural complexity
TCS2411 Software Engineering
5
Data Design Tasks
Database/File design
Extension of Entity-Relationship Diagram
Entities Tables
Attributes Columns
Relationships Columns, Tables
Describe database tables / files as follows:
TCS2411 Software Engineering
6
Data Design Tasks
TCS2411 Software Engineering
7
Data Design Tasks
TCS2411 Software Engineering
8
Data Design Tasks (Continued)
Data structure design
Arrays, structures/records, stacks, etc.
Describe structure and its use
Describe contents in similar way to database
tables/files
TCS2411 Software Engineering
9
Architecture design
Develop a modular program structure and
represent the control relationship between
modules
Can be represented by
Hierarchy of modules
Structure chart
Structure diagram
TCS2411 Software Engineering
10
Hierarchy of Modules
Process
File
Program
Read
File
Process
Record
Print
Record
TCS2411 Software Engineering
Generate
Report
Print
Error
11
Structure Chart
Process
File
Program
no. of records
record
record
eof
Read
File
Print
Record
TCS2411 Software Engineering
Generate
Report
Process
Record
record
no. of errors
error
Print
Error
12
Structure Diagram
Process
File
Program
while c1
Process *
Record
Read
File
Generate
Report
Check
Record
c2
Print
Record
Read
File
c3
o
TCS2411 Software Engineering
Print
Error
o
c1: not eof
c2: record ok
c3: error
13
Interface design
Screen design
For text-based screens, can use design forms
Format: 25 rows x 80 characters
For GUI, can use ‘Print Screen’
Report design
For text-based reports, e.g. dot-matrix printers, use
design forms (80 or 132 columns)
For graphical reports, use ‘Print Screen’
TCS2411 Software Engineering
14
Procedural design
Details of how modules work
Define algorithmic details
Possible to use natural language
Structured form: pseudocode, or PDL (Program
Design Language), also called structured English
Clearer with graphical methods such as
Flowchart
Nassi-Schneiderman chart (N-S chart), box
diagram
TCS2411 Software Engineering
15
Structured Programming
Set of logical constructs from which any
program can be formed: Sequence, Condition,
Repetition
Limit procedural design to small number of
predictable operations
Enter at top, exit at bottom
Reduce complexity, easier to understand and
maintain
Program separated into logical ‘chunks’
TCS2411 Software Engineering
16
Flowchart Constructs
TCS2411 Software Engineering
17
TCS2411 Software Engineering
18
Program Design Language(PDL)
if condition x
then process a;
else process b;
endif
if-then-else
PDL
easy to combine with source code
machine readable, no need for graphics input
graphics can be generated from PDL
enables declaration of data as well as procedure
easier to maintain
TCS2411 Software Engineering
19
Example of Pseudocode or PDL
Process File Procedure
Read file
While not end-of-file
If record ok then
Print record
Else
Print error
End if
Read file
End While
End
TCS2411 Software Engineering
20
Why Program Design Language?
can be a derivative for the HOL (High
Order Logic) of choice, e.g., Ada PDL
machine readable and processable
can be embedded with source code,
therefore easier to maintain
can be represented in great detail, if
designer and coder are different
easy to review
TCS2411 Software Engineering
21
Example of N-S Chart/ Box
Diagram Constructs
First task
Loop condition
Next task
Do-whilepart
Next + 1 task
Sequence
F Condition T
Elsepart
Thenpart
If-then-else
TCS2411 Software Engineering
Repeatuntilpart
Loop condition
Repetition
Case Condition
Value Value …..
Case- Case- …..
part
part
Selection
22
Nassi-Shneiderman (N-S) charts/
Box Diagram Characteristics
Functional domain (i.e. the scope of repetition
or if-then-else) is well defined and clearly
visible as a pictorial representation
Arbitrary transfer of control is impossible
The scope of local and/or global data can be
easily determined
Recursion is easy to represent, where depicted
with a bounding pattern that encloses the
process (do-while part or repeat-until part) to
be repeated.
TCS2411 Software Engineering
23
References
“Software Engineering: A Practitioner’s
Approach” 5th Ed. by Roger S. Pressman, McGraw-Hill, 2001
“Software Engineering” by Ian Sommerville,
Addison-Wesley, 2001
TCS2411 Software Engineering
24