Session Details
Week 5,
Session 14 — Tue Jan 12
Reading
-
Big Java, §8.5–8.10
HW Due
-
HW 13
Topics
-
Cohesion and Coupling
-
Immutable classes
-
Side effects
-
CRC cards
-
UML class diagrams, relationships
-
Static fields and methods
Resources
-
Slides
-
CRC cards for Chess
Outline
-
[10 min] Questions, show solution to last question on Exam 1
-
Class design, lecture:
-
[5 min] Good class design and bad class smells
-
[15 min] Cohesion, coupling, UML exercise
-
[5 min] Immutability and Side effects
-
[5 min] CRC cards
-
Class design, exercise (chess progam, work in groups of 3):
-
[5 min] Think about the problem, draw a screen sketch
-
[10 min] Do CRC cards (students will stall out, push them along)
-
[10 min] Share ideas, possibly including our CRC cards for Chess, then revise CRC cards
-
[3 min] Break
-
[5 min] UML class diagrams, relationships
-
[10 min] Generate UML class diagram from CRC cards (hand-drawn) using your own or our CRC cards for Chess
-
Static fields and methods:
-
[5 min] Static fields and methods
-
[15 min] Exercise on Static (Polygons), finish as homework
-
[2 min] Return exams
HW Assigned
-
HW 14