Session Details

Week 5, Session 14 — Thu Apr 15

Reading

  1. Big Java, §8.5–8.10

HW Due

  1. HW 13

Topics

  1. Cohesion and Coupling
  2. Immutable classes
  3. Side effects
  4. CRC cards
  5. UML class diagrams, relationships
  6. Static fields and methods

Resources

  1. Slides
  2. CRC cards for Chess

Outline

  1. [10 min] Questions, show solution to last question on Exam 1
  2. Class design, lecture:
  3. [5 min] Good class design and bad class smells
  4. [15 min] Cohesion, coupling, UML exercise
  5. [5 min] Immutability and Side effects
  6. [5 min] CRC cards
  7. Class design, exercise (chess progam, work in groups of 3):
  8. [5 min] Think about the problem, draw a screen sketch
  9. [10 min] Do CRC cards (students will stall out, push them along)
  10. [10 min] Share ideas, possibly including our CRC cards for Chess, then revise CRC cards
  11. [3 min] Break
  12. [5 min] UML class diagrams, relationships
  13. [10 min] Generate UML class diagram from CRC cards (hand-drawn) using your own or our CRC cards for Chess
  14. Static fields and methods:
  15. [5 min] Static fields and methods
  16. [15 min] Exercise on Static (Polygons), finish as homework
  17. [2 min] Return exams

HW Assigned

  1. HW 14