Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSE564 Lecture 04

CSE564 Lecture 04

Software Design
Modularization
(202101)

B546a9b97d993392e4b22b74b99b91fe?s=128

Javier Gonzalez

September 04, 2020
Tweet

Transcript

  1. jgs CSE 564 Software Design Lecture 04: Modularization Dr. Javier

    Gonzalez-Sanchez javiergs@asu.edu javiergs.engineering.asu.edu | javiergs.com PERALTA 230U Office Hours: By appointment
  2. jgs Announcements

  3. jgs 564 00000100 Reminder Assignment 01 § Due Date: Tuesday

    Jan 26, 11:59 PM (AZ time). § Submit Individually (or team of 2). Only 1 student submit BUT be sure both names are included using the JavaDoc @author label § Source Code in Java (SHOULD compile and run) § Show your skills for readability (make your code easy to read) – Clean Code § Use Javadoc (correctly) § If you are not familiar with Java Guidelines, review https://google.github.io/styleguide/javaguide.html § Input is a txt file (path is to be received as parameter to main). § Output is to be printed on screen § Do not make assumptions. If you have a question, Ask
  4. jgs 564 00000100 Quiz 01 § Due Date: Tuesday Jan

    26, 11:59 PM (AZ time). § Submit Individually § Most questions about Lecture 1 and Syllabus § A few about Lecture 2 and 3.
  5. jgs Modularization

  6. jgs 564 00000100 Timeline 1971 Wirth 1972 Parnas

  7. jgs 564 00000100 Decomposing Systems into Modules (1972) On the

    Criteria To Be Used in Decomposing Systems into Modules April 1972 D.L. Parnas Communications of the ACM Pioneer of software engineering ACM Fellow Developed the concept of information hiding
  8. jgs 564 00000100 • What criteria to use? • Niklaus

    Wirth. • Information Hiding : A data structure, its internal linking, accessing procedures and modifying procedures are part of a single module • What is a module? • What is the difference of Function vs Module? • What is the difference of Task vs Responsibility?
  9. jgs 564 00000100 Decomposing Systems into Modules (1972) • Modularization

    Design decisions / independent modules • It improves flexibility and comprehensibility • What criteria to use in dividing the system into modules? Rule A: Information Hiding – data, getters, and setters in one module Rule B: A set of related tasks must live in the same module
  10. jgs 564 00000100 Wirth + Parnas • Niklaus Wirth. •

    Each major step in the process a module. • Begins with a list of difficult design decisions or design decisions which are likely to change. Each module is then designed to hide such a decision from the others. • In some cases, modules will not correspond to steps in the processing.
  11. jgs 564 00000100 Concepts • Module is a responsibility assignment

    rather than a subprogram. • Module specification = its inputs, its outputs its interfaces • Small enough and simple enough to be thoroughly understood • Independent development of modules • Comprehensibility: they make easy to understand parts, connections, and the whole.
  12. jgs And …

  13. jgs 00000010 [ - < < ( - ) >

    > ] [ ( < - > ) ] main () { home if(){ if(){ while() { whatever } } } } home () { while() { if() { something } } } Case Study 1
  14. jgs 564 00000100 Software Design | Release 01

  15. jgs 00000010 [ integer < < ( float ) >

    > ] [ ( < text > ) ] integer home, wxy. float whatever, a, b. text something. main () { home if( 1 = 1){ if( wxy = 123){ while(a1 == x7) { whatever } } } } home () { while(a = b) { if(123 = 456) { something } } } Case Study 2
  16. jgs 564 00000100 Software Design | Drafting a Release 02

  17. jgs To be continued …

  18. jgs CSE 564 Computer Systems Fundamentals Javier Gonzalez-Sanchez javiergs@asu.edu Fall

    2020 Disclaimer. These slides can only be used as study material for the class CSE564 at ASU. They cannot be distributed or used for another purpose.