$30 off During Our Annual Pro Sale. View Details »

CSE564 Lecture 02

CSE564 Lecture 02

Software Design
The Beginning
(202101)

Javier Gonzalez-Sanchez
PRO

September 02, 2020
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. jgs
    CSE 564
    Software Design
    Lecture 02: The Beginning
    Dr. Javier Gonzalez-Sanchez
    [email protected]
    javiergs.engineering.asu.edu | javiergs.com
    PERALTA 230U
    Office Hours: By appointment

    View Slide

  2. jgs
    Previously

    View Slide

  3. jgs
    Fall 2021 | 00000010
    What Makes a Good Design?
    OOAD, Grady Booch, 2007

    View Slide

  4. jgs
    The Beginning

    View Slide

  5. jgs
    Fall 2021 | 00000010
    Timeline
    1971
    1985
    1972
    1969
    1959 1995
    1997

    View Slide

  6. jgs
    Fall 2021 | 00000010
    Stepwise Refinement (1971)
    Program Development by Stepwise Refinement
    April 1971
    Niklaus Wirth
    Communications of the ACM
    Computer Scientist,
    Turing Award 1984 for
    developing a sequence of innovative programming languages.

    View Slide

  7. jgs
    Fall 2021 | 00000010
    Stepwise Refinement (1971)
    Note:
    The author gratefully acknowledges the helpful and stimulating
    influence of many discussions with
    • A. Hoare - sorting algorithm quicksort (1959)
    • E. W. Dijkstra - shortest path algorithm (1956) and compiler
    construction, operating systems, distributed systems,
    concurrent programming, programming language, program
    verification, graph algorithms, etc.

    View Slide

  8. jgs
    Fall 2021 | 00000010
    Stepwise Refinement (1971)
    Key Idea:
    Decoupling
    Specifically,
    This is ONE (of many) approach to achieve Decoupling
    Definition:
    Decoupling is separate, disengage, or dissociate (something)
    from something else.
    What is the something in this case?

    View Slide

  9. jgs
    Fall 2021 | 00000010
    Stepwise Refinement (1971)
    • Top-Down Design Technique
    • It is about successive refinement
    Definition:
    Refinement = task is broken up into a number of subtasks
    What is a Task?
    Goals:
    • Refinement implies design decisions based upon a set of
    design criteria.
    • Among these criteria are efficiency, storage economy, clarity,
    and regularity of structure (quality).
    • maintainability and extensibility (portability) can be measured
    primarily in terms of the degree to which a program is neatly
    structured.

    View Slide

  10. jgs
    Fall 2021 | 00000010
    Stepwise Refinement (1971)
    Author’s Conclusions:
    • programming is not about learning a powerful programming
    language
    • programming is NOT easy
    • Students must be taught to be conscious of the involved
    decisions and to critically examine and to reject solutions,
    sometimes even if they are correct as far as the result is
    concerned; they must learn to weigh the various aspects of
    design alternatives in the light of these criteria.

    View Slide

  11. jgs
    Fall 2021 | 00000010
    Stepwise Refinement (1971)
    Author’s Conclusions:
    • Programming = Coding + Design
    • Function-driven development
    • Function, method, procedure
    • Thought Processes: Sequence, Selection, Iteration

    View Slide

  12. jgs
    And …

    View Slide

  13. jgs
    Fall 2021 | 00000010
    Timeline
    2021

    View Slide

  14. jgs
    Fall 2021 | 00000010
    Questions
    § Who many words in an abstract?
    § Who many lines in a paragraph?
    § Who many paragraphs in a chapter?
    § Who many pages in a chapter?
    § Who many chapters in a book?

    View Slide

  15. jgs
    Fall 2021 | 00000010
    Questions
    § How many LOC in a function or procedure or method?
    § What about complexity (Cyclomatic Complexity) ?
    § How many inputs?
    § How many outputs?
    § What about exception handling?

    View Slide

  16. jgs
    Case Study
    Stepwise Refinement
    Decision-making

    View Slide

  17. jgs
    Fall 2021 | 00000010
    Case Study

    View Slide

  18. jgs
    Fall 2021 | 00000010
    Case Study

    View Slide

  19. jgs
    Fall 2021 | 00000010
    Case Study

    View Slide

  20. jgs
    Fall 2021 | 00000010
    Homework
    § You won’t submit yet
    § Draft the source code. It will be discussed in our next lecture
    Problem to solve:
    1. A data structure to store flow charts
    2. Nodes?
    3. Types?
    4. Data / Content?
    5. How to connect?
    6. Who does the checking? When?

    View Slide

  21. jgs
    Fall 2021 | 00000010
    Homework
    Read:
    § On the Criteria To Be Used in Decomposing Systems into Modules
    D.L. Parnas
    Communications of the ACM
    April 1972

    View Slide

  22. jgs
    Fall 2021 | 00000010
    To be continued …

    View Slide

  23. jgs
    CSE 564 Software Design
    Javier Gonzalez-Sanchez, Ph.D.
    [email protected]
    Fall 2021
    Copyright. These slides can only be used as study material for the class CSE564 at ASU.
    They cannot be distributed or used for another purpose.

    View Slide