Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jump to first page 1 System Design (Finalizing Design Specifications) Chapter 3d.

Similar presentations


Presentation on theme: "Jump to first page 1 System Design (Finalizing Design Specifications) Chapter 3d."— Presentation transcript:

1 Jump to first page 1 System Design (Finalizing Design Specifications) Chapter 3d

2 Jump to first page 2 Learning Objectives Read and understand a structure chart Describe measures of good design Understand cohesion and coupling

3 Jump to first page 3

4 4 The Process of Finalizing Design Specifications n Less costly to correct and detect errors during the design phase n Deliverable: a set of design specifications for the entire system, with detailed functional descriptions of each system component

5 Jump to first page 5 Design Specification Document n Contains: u Overall system description u Interface requirements u System features u Nonfunctional requirements u Other requirements u Supporting diagrams and models

6 Jump to first page 6 The Structure Chart n Important program design technique n Shows all components of code in a hierarchical format u Sequence – what order of component? u Selection – what condition? u Iteration – how often?

7 Jump to first page 7 Structure Chart Elements 1.2 Calculate Current GPA Module 1.1 Get Student Grade Record Library Module Loop Conditional Line Control Couple Data Couple Off Page On page

8 Jump to first page 8 Steps in Building the Structure Chart 1. Identify top level modules and decompose them into lower levels 2. Add control connections 3. Add couples 4. Review and revise again and again until complete

9 Jump to first page 9

10 10

11 Jump to first page 11

12 Jump to first page 12 Design Guidelines n High quality structure charts result in programs that are modular, reusable and easy to implement. n Measures include: u Cohesion: extent to which a module performs a single function u Coupling: dependencies between modules u Appropriate levels of fan-in and fan- out

13 Jump to first page 13 Design Guidelines Software is divided into modules. There should be: Minimum interaction between modules [low coupling] AND High degree of interaction within a module [high cohesion] Therefore, an individual module can be DESIGNED, CODED, TESTED OR CHANGED easily.

14 Jump to first page 14 Types of Cohesion n Functional n Sequential n Communicational n Procedural n Temporal n Logical n Coincidental Good Bad

15 Jump to first page 15 Example of Low Cohesion Logical Cohesion

16 Jump to first page 16 Types of Coupling n Data n Stamp n Control n Common n Content Good Bad

17 Jump to first page 17 a cb d hgf e kj i Data structure Data (Var) Control flag No direct coupling Global data area Example of Coupling Level Stamp coupling data coupling control coupling common coupling

18 Jump to first page 18 Fan-in/Fan-out

19 Jump to first page 19 Fan-in High fan-in preferred Promotes reuse of subordinate modules 1.1 Calculate Employee Salary 1.2 Print Employee Roster 1.3 Calculate Benefits 2.1.1 Read Employee Record 1.1 Calculate Employee Salary 1.2 Print Employee Roster 1.3 Calculate Benefits 1.1.1 Read Employee Record 1.2.1 Read Employee Record 1.3.1 Read Employee Record Low fan-in not preferred

20 Jump to first page 20 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” 8. Each module has a reasonable amount of code associated with it

21 Jump to first page 21 Pseudocode n Method used for representing the instructions inside a module n Language similar to computer programming code n Two functions: u Helps analyst think in a structured way about the task a module is designed to perform u Acts as a communication tool between analyst and programmer

22 Jump to first page 22 Pseudocode Example SET total to zero REPEAT READ Temperature IF Temperature > Freezing THEN INCREMENT total END IF UNTIL Temperature < zero Print total

23 Jump to first page 23 Summary n In this chapter you learned how to: Read and understand a structure chart Describe measures of good design Understand cohesion and coupling


Download ppt "Jump to first page 1 System Design (Finalizing Design Specifications) Chapter 3d."

Similar presentations


Ads by Google