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

CSE205 Lecture 21

CSE205 Lecture 21

Object-Oriented Programming and Data Structures
Connecting the Dots
(202111)

B546a9b97d993392e4b22b74b99b91fe?s=128

Javier Gonzalez
PRO

October 01, 2021
Tweet

Transcript

  1. jgs CSE 205 Object-Oriented Programming and Data Structures Lecture 21:

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

  3. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 3 jgs

    1. Perkins, John 2. Trevino, Xzander 3. Cochran, Sydney 4. Parmeley, Michael 5. Branting, Riley
  4. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 4 jgs

    1. Glasco, Esaias 2. Esposito, Andrew 3. Fontes, Nicholas 4. Richardson, Stephen 5. Antonino, Jorge
  5. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 5 jgs

    1. Jimenez, Cesar 2. Woart, Julius 3. Forbes, Andrew 4. Regnier, Daniel
  6. jgs Nuts and bolts of Binary Trees Traverse

  7. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 7 jgs

    Tree | Traverse In Order public void traverseInOrder(Node node) { if (node != null) { traverseInOrder(node.left); System.out.print(" " + node.value); traverseInOrder(node.right); } }
  8. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 8 jgs

    Tree | Traverse In Order
  9. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 9 jgs

    Tree | Traverse Pre Order public void traverseInOrder(Node node) { if (node != null) { System.out.print(" " + node.value); traverseInOrder(node.left); traverseInOrder(node.right); } }
  10. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 10 jgs

    Tree | Traverse Pre Order
  11. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 11 jgs

    Tree | Traverse Post Order public void traverseInOrder(Node node) { if (node != null) { traverseInOrder(node.left); traverseInOrder(node.right); System.out.print(" " + node.value); } }
  12. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 12 jgs

    Tree | Traverse Post Order
  13. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 13 jgs

  14. jgs Connecting the Dots Assignment 05

  15. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 15 jgs

    Step 1
  16. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 16 jgs

    Step 1
  17. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 17 jgs

    Step 2
  18. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 18 jgs

    Step 2
  19. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 19 jgs

    Step 3. Undo
  20. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 20 jgs

    Step 4. Erase
  21. jgs Hints Assignment 05

  22. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 22 jgs

    Workspace.java
  23. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 23 jgs

    Shape public class Rectangle { private int x, y, w, h; public void draw (Graphics g) { Color c = g.getColor(); g.fillRect(x, y, w, h); }
  24. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 24 jgs

    MouseListener § public void mousePressed (MouseEvent e) { int x = e.getX() - labelSize.width / 2; int y = e.getY() - labelSize.height / 2; // do something repaint(); } public void mouseClicked(MouseEvent e) { } public void mouseReleased(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } § public void mouseDragged(MouseEvent me) { } public void mouseMoved(MouseEvent e) { }
  25. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 25 jgs

    MouseMotionListener § public void mouseDragged(MouseEvent me) { } public void mouseMoved(MouseEvent e) { }
  26. Javier Gonzalez-Sanchez | CSE205 | Fall 2021 | 26 jgs

    Questions
  27. jgs CSE 205 Object-Oriented Programming and Data Structures Javier Gonzalez-Sanchez,

    Ph.D. javiergs@asu.edu Fall 2021 Copyright. These slides can only be used as study material for the class CSE205 at Arizona State University. They cannot be distributed or used for another purpose.