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

CSE564 Lecture 20

CSE564 Lecture 20

Software Design
Connecting the Dots II
(202111)

Javier Gonzalez-Sanchez

September 20, 2020
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. jgs CSE 564 Software Design Lecture 20: Connecting the Dots

    II Dr. Javier Gonzalez-Sanchez [email protected] javiergs.engineering.asu.edu | javiergs.com PERALTA 230U Office Hours: By appointment
  2. jgs 564 00010100 Announcement § Quiz 5 is open and

    due November 16 (before our lecture time) 30 minutes Individual. § Assignment 4 is open and due November 18 (before our lecture time) Programming assignment It is a team project. I create the teams. No, you cannot change your team Report to us if someone is not working or able to be contacted
  3. jgs 564 00010100 Step 1. Menu File Connections Action New

    Load Save TSP – nearest neighbor Clusters User connect TSP - pro Move ⬁ Connect ↘ * Double click a city to edit Create ✩
  4. jgs 564 00010100 Step 2. Actions D B A C

    Move ⬁ Connect ↘ Create ✩ File Connections Action Factory Factory Iterator Iterator
  5. jgs 564 00010100 Step 3. Connections D B A C

    File Connections Action TSP – nearest neighbor Clusters User connect TSP - pro
  6. jgs 564 00010100 Step 3. Connections § TSP – pro

    The most direct solution would be to try all permutations (ordered combinations) and see which one is cheapest (using brute-force search). The running time for this approach lies within a polynomial factor of O (n!), the factorial of the number of cities, so this solution becomes impractical even for only 20 cities. https://en.wikipedia.org/wiki/Travelling_salesman_problem § Keep the GUI drawing lines. § Use multithreading
  7. jgs 564 00010100 Step 3. Connections D B A C

    File Connections Action TSP – nearest neighbor Clusters User connect TSP - pro Handler Iterator
  8. jgs 564 00010100 Step 4. File D B A C

    File Connections Action
  9. jgs 564 00010100 Step 5. Customize Cities File Connections Action

    D B A C • Shape • Color • Size * Double click a city to edit We are going to have problems detecting “selection” (contains)
  10. jgs 564 00010100 Status Bar | Keep the User on

    the Loop messages, what is happening? Logger
  11. jgs 564 00010100 Key Ideas Manufacturing VS. Craftmanship Take advantage

    of § SOLID principles § Design Patterns § Low Coupling § High Cohesion Grades are individual, then a) How to stablish a limit to my responsibilities and the others? b) How to facilitate integration? c) Component Oriented Approach
  12. jgs 564 00010100 Idea 2 Main Factory Gift Ball Box

    Envelop Handler Supervisor Bin GUI
  13. jgs 564 00010100 Idea (and this is NOT a class

    diagram) wrapper2 Main wrapper1 Factory decoration Envelope Box Gift wrapper3 ball Supervisor Is big > 10, box Is small < 5, envelop Is not big and It is not small, no decoration
  14. jgs 564 00010100 Idea 2 Main Factory Gift Ball Box

    Envelop Handler Supervisor Bin GUI
  15. 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.