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

CSE564 Lecture 05

CSE564 Lecture 05

Software Design
Assignment 01 and 02
(202101)

B546a9b97d993392e4b22b74b99b91fe?s=128

Javier Gonzalez
PRO

September 05, 2020
Tweet

More Decks by Javier Gonzalez

Other Decks in Programming

Transcript

  1. jgs CSE 564 Software Design Lecture 05: Assignment 01 Review

    and Assignment 02 Dr. Javier Gonzalez-Sanchez javiergs@asu.edu javiergs.engineering.asu.edu | javiergs.com PERALTA 230U Office Hours: By appointment
  2. jgs 564 00000101 Announcement § Quiz 02 to open after

    next lecture. All about the papers that you read § Assignment 02 open today. I will describe it now
  3. jgs 564 00000101 Homework Read: § Programming in the Large

    vs Programming in the Small F. DeRemer International Conference on Reliable Software April 1975 § Teaching Object-Oriented Thinking Kent Beck (JUnit 👀) International conference on OOPSLA October 1989 § Continue with programming; but nothing to submit yet
  4. jgs Previously …

  5. jgs 564 00000101 Wirth + Parnas • Niklaus Wirth. •

    Each major step in the process a module. • And Modules enclose Tasks • 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.
  6. jgs Assignment 01 Review

  7. jgs 564 00000101 Syllabus (page 6)

  8. jgs 564 00000101 Thoughts?

  9. jgs 564 00000101 Thoughts?

  10. jgs 564 00000101 Thoughts?

  11. jgs 564 00000101 Thoughts?

  12. jgs 564 00000101 Thoughts?

  13. jgs 564 00000101 Thoughts?

  14. jgs 564 00000101 Thoughts?

  15. jgs Assignment 02

  16. jgs 564 00000101 Test Yourselves: Problem Traveling salesman problem (TSP)

    Given a set of n nodes and distances for each pair of nodes, find a roundtrip of minimal total length visiting each node exactly once.
  17. jgs 564 00000101 Test Yourselves: Problem Traveling salesman problem (TSP)

    Given a set of n nodes and distances for each pair of nodes, find a roundtrip of minimal total length visiting each node exactly once.
  18. jgs 564 00000101 Test Yourselves: Data § Symmetric The distance

    from node i to node j is the same as from node j to node i. http://www.math.uwaterloo.ca/tsp/world/countries.html 29 cities - 71,009 cities
  19. jgs 564 00000101 Test Yourselves: Data Symmetric

  20. jgs 564 00000101 Test Yourselves: Data § Symmetric The distance

    from node i to node j is the same as from node j to node i. http://www.math.uwaterloo.ca/tsp/world/countries.html 29 - 71009 § Asymmetric The distance from node i to node j and the distance from node j to node i may be different. http://elib.zib.de/pub/mp-testdata/tsp/tsplib/atsp/index.html 17 to 443
  21. jgs 564 00000101 Test Yourselves: Data Asymmetric

  22. jgs 564 00000101 Test Yourselves: Solution It is an NP-hard

    problem. Do not worry for an optimal solution a) Calculate and report the total distance for a dummy route as city1, city2, city3, city4, … b) Calculate and report the total distance using a greedy algorithm (nearest-neighbors) or any other fancy solution (2-opt, genetic algorithm, etc.) city1, city2, city3, city4, … Do not forget the GUI
  23. jgs 564 00000101 Test Yourselves: Software § Information Hiding... How?

    § Stepwise refinement… How? § How many modules / functions? Why ? § How they will be connected (who call who? Who needs who?) Why ? § Which is the largest file (symmetric and asymmetric) that your solution can process? Can you improve that? How? § Your program should stop (by itself) in 300 seconds. § Sequential solution is acceptable, but challenge yourselves to use at least threads (CPU) or go for GPU programming
  24. jgs 564 00000101 Assignment 02 Submit to Canvas (individually or

    team of 2): a) Source Code (every single java files). b) A PDF file a paper describing § your code and how did you apply Wirth and Parnas ideas a.k.a. functional decomposition and information hiding. § Screenshot with the output for small, medium, and large scenario § A conclusion addressing the quality of your solution PS.1. Showcase your skills for readability (make your code easy to read) PS.2. Include Javadoc
  25. jgs 564 00000101 Questions

  26. jgs Appendix Java Swing

  27. jgs 564 00000101 Example

  28. jgs 564 00000101 Main.java

  29. jgs 564 00000101 Canva.java

  30. jgs CSE 564 Software Design Javier Gonzalez-Sanchez, Ph.D. javiergs@asu.edu 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.