Session Details

Week 1, Session 3 — Tue Sep 4

Reading

  1. Big Java, §2.8–2.10
  2. First two pages of this intro to UML Class Diagrams
  3. Big Java, §3.1–3.8, Pay particular attention to §3.8

HW Due

  1. HW 2

Topics

  1. Unit tests with JUnit
  2. Object references
  3. Object-Oriented Encapsulation
  4. Implementing Classes in Java

Resources

  1. Slides

Outline

  1. [5] Questions
  2. [5] Javadoc Recap
  3. [15] Unit testing with JUnit. Examine JUnitMoveTester in JavadocsAndUnitTesting project.
  4. [20] JUnit exercise: create and implement StringMethodsPracticeTest in JavadocsAndUnitTesting project.
  5. [10] Object references, assignment, box and pointer diagrams
  6. [5 min] OO encapsulation
  7. [5 min] Break
  8. [15 min] Java classes. Live coding on implementing a class: implement Shouter and add a test to ShouterTest in the WordGames project, as specified in the WordGames instructions.
  9. [15 min] More live coding on implementing a class: implement Censor and add a test to CensorTest in the WordGames project, as specified in the WordGames instructions.
  10. [10 min] Begin homework (continue working per the WordGames instructions).

HW Assigned

  1. HW 3