Pow erPoint Course Mat erial for SCELE Graduat e Program I nform at ion Technology
Facult y of Com put er Science – UNI VERSI TY OF I NDONESI A
PERANCANGAN SISTEM INFORMASI
Session 9 Program Design
Based on System Analysis & Design 2
nd
Edition
Authors : Alan Dennis & Barbara Haley Wixom
Publisher : John Wiley & Sons
Session 9 Program Design
Session 9 Program Design
Based on System Analysis & Design 2
nd
Edition
2
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
Objectives
Objectives
Be able to create a structure chart
Be able to write a program specification
Understand the use of pseudocode
3
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
Key Definitions
Key Definitions
Program design
- creating instructions for the
programmers
The
top-down, modular approach
- begin with
the “big picture” and gradually add detail
Program design document
– all structure
charts and specifications needed by
4
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
5
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
The Structure Chart
The Structure Chart
Important program design technique
Shows all components of code in a hierarchical
format
6
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
7
8
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
Building the Structure Chart
Building the Structure Chart
Processes in the DFD tend to represent one
module on the structure chart
Afferent processes – provide inputs to system
Central processes – perform critical system
operations
Efferent processes – handle system outputs
9
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
Types of Structure Charts
Types of Structure Charts
Transaction
structure – control module calls
subordinate modules, each of which handles a
particular transaction
Many afferent processes
Few efferent processes
1 0
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
1 1
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
Types of Structure Charts
Types of Structure Charts
Transform
structure – control module calls
several subordinate modules in sequence
Each subordinate performs a step in a process
that transforms an input into an output
Few afferent processes
Many efferent processes
Lower levels of structure chart
1 2
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
1 3
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
Steps in Building the Structure Chart
Steps in Building the Structure Chart
1. Identify top level modules and decompose
them into lower levels
2. Add control connections
3. Add couples
1 4
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
1 5
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
1 6
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
1 7
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
Design Guidelines
Design Guidelines
High quality structure charts result in
programs that are modular, reusable and easy
to implement.
Measures include:
Cohesion
Coupling
1 8
1 9
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
Example of Low Cohesion
Example of Low Cohesion
2 0
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
Cohesion Decision Tree
Cohesion Decision Tree
2 1
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
Factoring
Factoring
2 2
2 3
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
Your Turn
Your Turn
What, if anything, happens to coupling when
you create modules that are more cohesive?
2 4
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
Fan-in
Fan-in
High fan-in preferred
Promotes reuse of subordinate modules
1.1
2 5
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
Quality Checklist
Quality Checklist
1. Library modules have been created where ever possible
2. The diagram has a high fan-in structure
3. Control modules have no more than 7 subordinates
4. Each module performs only one function (high cohesion)
5. Modules sparingly share information (loose coupling)
6. Data couples that are passed are actually used by the
accepting module
7. Control couples are passed from “low to high”
2 6
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
2 7
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
Program Specifications Content
Program Specifications Content
No standard approach
Include program information
Note events that trigger actions
List inputs and outputs
Include pseudocode
2 8
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
2 9
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
Pseudocode Example
Pseudocode Example
( Get CD- info m odule)
Accept ( CD_t it le) { Required}
Accept ( CD_art ist ) { Required}
Accept ( CD_cat egory) { Required}
Accept ( CD_lengt h)
3 0
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
CASE Tool View of Process Description
3 1
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia
3 2
Pow erPoint Course Mat er ial for SCELE Graduat e Program I nform at ion Technology Fa cu lt y of Com put e r Scie n ce – Unive r sit y of I n don e sia