Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Detailed Design Representations (Chapter 9 of Code Complete) Steve Chenoweth CSSE 375, Rose-Hulman Based on Don Bagert’s 2006 Lecture.

Similar presentations


Presentation on theme: "1 Detailed Design Representations (Chapter 9 of Code Complete) Steve Chenoweth CSSE 375, Rose-Hulman Based on Don Bagert’s 2006 Lecture."— Presentation transcript:

1 1 Detailed Design Representations (Chapter 9 of Code Complete) Steve Chenoweth CSSE 375, Rose-Hulman Based on Don Bagert’s 2006 Lecture

2 2 Today (Mon, Sep 17, 2007)  Review Reuse & Reusability  Two topics – Detailed design & pseudocode – this Maintenance Management & Organization  Tonight – Turn in your team’s maintenance plan  Note: Exam, Wed night, Oct 3, 7 – 9 PM

3 3 Outline  Detailed Design Representations Background Pseudocode Other Representations

4 4 Background  In some ways, detailed design is becoming a lost art  Nowadays, programmers often write source code directly from high-level design  Is this a good thing?

5 5 What is Pseudocode?  An informal, natural-language notation for describing an algorithm  Advantages: Structure is similar to source code Can describe various levels of detail

6 6 Example: Whether or not an integer is a prime number – 1/3 First iteration (keeps to definition of prime number): If the integer < 2 Return false Else Determine whether there is a factor between 2 and the integer minus 1 If no factor is found Return true Else Return false End If

7 7 Example: Whether or not an integer is a prime number – 2/3 Second iteration (Takes advantage of known facts): If the integer < 2 Return false Else if the integer = 2 Return true Else if the integer is even Return false Else Determine whether there is a factor between 3 and the square root of the integer If no factor is found Return true Else Return false End If

8 8 Example: Whether or not an integer is a prime number – 3/3 Third iteration (Determination loop and variables included): If n < 2 Return false Else If n = 2 Return true Else If n is even Return false Else FactorNotFound = true Index = 3 While FactorNotFound and Index <= the square root of n do If Index is a factor of n FactorNotFound = false Else Index = Index + 2 End if End While Return FactorNotFound End if

9 9 Group Discussion: Do you think that pseudocode is useful?

10 10 Other Detailed Design Representations  Flowcharts Classic  Examples: http://www.tpub.com/neets/book22/93c.htm http://www.fh-jena.de/~kleine/history/software/IBM- FlowchartingTechniques-GC20-8152-1.pdf (from 1969!) http://www.fh-jena.de/~kleine/history/software/IBM- FlowchartingTechniques-GC20-8152-1.pdf Structured  Example: http://www.cs.umd.edu/hcil/members/bshneiderman/nsd  Control Structure Diagrams  jGRASP http://www.jgrasp.org /http://www.jgrasp.org /

11 11 jGRASP Exercise (if we have time)


Download ppt "1 Detailed Design Representations (Chapter 9 of Code Complete) Steve Chenoweth CSSE 375, Rose-Hulman Based on Don Bagert’s 2006 Lecture."

Similar presentations


Ads by Google