session 9 program design - ui open...
TRANSCRIPT
PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – UNIVERSITY OF INDONESIA
PERANCANGAN SISTEM INFORMASI
Session 9 Program Design
Based on System Analysis & Design 2nd EditionAuthors : Alan Dennis & Barbara Haley Wixom
Publisher : John Wiley & Sons
Session 9 Program DesignSession 9 Program Design
Based on System Analysis & Design 2nd EditionAuthors : Alan Dennis & Barbara Haley Wixom
Publisher : John Wiley & Sons
2PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
ObjectivesObjectives
Be able to create a structure chartBe able to write a program specificationUnderstand the use of pseudocodeBecome familiar with event-driven programming
3PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Key DefinitionsKey Definitions
Program design - creating instructions for the programmers The top-down, modular approach - begin with the “big picture” and gradually add detailProgram design document – all structure charts and specifications needed by programmers to implement the system
4PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
STRUCTURE CHART
5PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
The Structure ChartThe Structure Chart
Important program design techniqueShows all components of code in a hierarchical format
SequenceSelectionIteration
6PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Structure Chart ExampleStructure Chart Example
7PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Structure Chart ElementsStructure Chart Elements
ModuleLibrary moduleLoopConditional lineData coupleControl coupleOff-page connectorOn-page connector
8PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Building the Structure ChartBuilding the Structure Chart
Processes in the DFD tend to represent one module on the structure chart
Afferent processes – provide inputs to systemCentral processes – perform critical system operationsEfferent processes – handle system outputs
The DFD leveling can correspond to the structure chart hierarchy
9PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Types of Structure ChartsTypes of Structure Charts
Transaction structure – control module calls subordinate modules, each of which handles a particular transaction
Many afferent processesFew efferent processesHigher up levels of structure chartUsing inputs to create a new output
10PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Transaction StructureTransaction Structure
11PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Types of Structure ChartsTypes of Structure Charts
Transform structure – control module calls several subordinate modules in sequenceEach subordinate performs a step in a process that transforms an input into an output
Few afferent processesMany efferent processesLower levels of structure chartCoordinates the movement of outputs
12PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Transform StructureTransform Structure
13PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Steps in Building the Structure ChartSteps in Building the Structure Chart
1. Identify top level modules and decompose them into lower levels
2. Add control connections3. Add couples4. Review and revise again and again until
complete
14PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
CD SELECTIONSCD SELECTIONS
15PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
CD SELECTIONSCD SELECTIONS
16PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
CD SELECTIONSCD SELECTIONS
17PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Design GuidelinesDesign Guidelines
High quality structure charts result in programs that are modular, reusable and easy to implement.Measures include:
CohesionCouplingAppropriate levels of fan-in and fan-out
18PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Types of CohesionTypes of Cohesion
Types of Cohesion
FunctionalSequentialCommunicationalProceduralTemporalLogicalCoincidental
What Would Be an Exampleof Each?
19PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Example of Low CohesionExample of Low Cohesion
Logical Cohesion
20PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Cohesion Decision TreeCohesion Decision Tree
Adapted from Page-Jones, 1980
21PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
FactoringFactoring
Process of dealing with “low” cohesionSeparates tasks into different modulesReduces use of control flags
22PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Types of CouplingTypes of Coupling
Types of Coupling
DataStampControlCommonContent
What Would Be an Exampleof Each?
Good
Bad
23PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Your TurnYour Turn
What, if anything, happens to coupling when you create modules that are more cohesive?What, if anything happens to the cohesiveness of modules when you lower the coupling among them?
24PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Fan-inFan-in
High fan-in preferredPromotes reuse of subordinate modules
1.1CalculateEmployee
Salary
1.2Print
EmployeeRoster
1.3CalculateBenefits
2.1.1Read
EmployeeRecord
1.1CalculateEmployee
Salary
1.2Print
EmployeeRoster
1.3CalculateBenefits
1.1.1Read
EmployeeRecord
1.2.1Read
EmployeeRecord
1.3.1Read
EmployeeRecord
Low fan-in not preferred
25PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Quality ChecklistQuality Checklist1. Library modules have been created where ever possible2. The diagram has a high fan-in structure3. Control modules have no more than 7 subordinates4. 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 module7. Control couples are passed from “low to high”8. Each module has a reasonable amount of code associated
with it
26PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
PROGRAM SPECIFICATION
27PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Program Specifications ContentProgram Specifications Content
No standard approachInclude program informationNote events that trigger actionsList inputs and outputsInclude pseudocodePresent additional notes and comments
28PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Program Specification FormProgram Specification Form
29PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
Pseudocode ExamplePseudocode Example
(Get CD-info module)Accept (CD_title) {Required}Accept (CD_artist) {Required}Accept (CD_category) {Required}Accept (CD_length)
Return
30PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
CASE Tool View of Process DescriptionCASE Tool View of Process Description
31PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
CD SELECTIONCD SELECTION
32PowerPoint Course Material for SCELE Graduate Program Information TechnologyFaculty of Computer Science – University of Indonesia
SummarySummaryThe structure chart shows all of the functional components needed in the program at a high level. Components of the structure chart show sequence, selection, and iterationFollow design guidelines regarding cohesion, coupling, and fan-in/fan-out.Prepare detailed specifications to programmers including pseudocode to show important programming structures.