| CS615 – Software
Engineering I |
| Lecture
6 |
Chapter 16: Component-Level Design
Purpose
-
Translate the design
model into operational software.
-
Represent the software
in a way that allows its review or correctness and consistency, before
it is built
Timeline
-
Occurs after the data,
architectural, and interface designs are established
Work Product
-
Procedural design for
each software component, represented using graphical, tabular, or text-based
notation.
Structured Programming
-
Each block of code has
a single entry at the top
-
Each block of code has
a single exit at the bottom
-
Three control structures
are required:
-
sequence
-
condition (if-then-else)
-
repetition (looping)
-
Reduces program complexity
by enhancing readability, testability, and maintainability
Design Notation
-
Flowcharts (arrows
for flow of control, diamonds for decisions, rectangles for processes)
-
Box diagrams
(also known as Nassi-Scheidnerman charts - process boxes subdivided to
show conditional and repetitive steps)
-
Characteristics:
(1) functional domain
(that is, the scope of repetition or if-then-else) is well defined and
clearly visible as a pictorial representation
(2) arbitrary transfer
of control is impossible
(3) the scope of
local and/or global data can be easily determined
(4) recursion is
easy to represent
-
Decision table (subsets
of system conditions and actions are associated with each other to define
the rules for processing inputs and events)
Steps to
develop a decision table:
-
List all actions that
can be associated with a specific procedure (or module).
-
List all conditions
(or decisions made) during execution of the procedure.
-
Associate specific sets
of conditions with specific actions, eliminating impossible combinations
of conditions; alternatively, develop every possible permutation of conditions.
-
Define rules by indicating
what action(s) occurs for a set of conditions.
Example
If the customer
account is billed using a fixed rate method, a minimum monthly charge is
assessed for consumption of less than 100 KWH (kilowatt-hours). Otherwise,
computer billing applies a Schedule A rate structure. However, if the account
is billed using a variable rate method, a Schedule A rate structure will
apply to consumption below 100 KWH, with additional consumption billed
according to Schedule B.
-
Program Design Language
(PDL - structured English or pseudocode used to describe processing details)
-
Characteristics
-
Fixed syntax with keywords
providing for representation of all structured constructs, data declarations,
and module definitions
-
Free syntax of natural
language for describing processing features
-
Data declaration facilities
for simple and complex data structures
-
Subprogram definition
and invocation facilities
Design Notation Assessment Criteria
-
Modularity (notation
supports development of modular software)
-
Overall simplicity
(easy to learn, easy to use, easy to write)
-
Ease of editing
(easy to modify design representation when changes are necessary)
-
Machine readability
(notation can be input directly into a computer-based development system)
-
Maintainability
(maintenance of the configuration usually involves maintenance of the procedural
design representation)
-
Structure enforcement
(enforces the use of structured programming constructs)
-
Automatic processing
(allows the designer to verify the correctness and quality of the design)
-
Data representation
(ability to represent local and global data directly)
-
Logic verification
(automatic logic verification improves testing adequacy)
-
"Code-to" ability
(easily converted to program source code)