CSSE 220 – Object-Oriented Software Development

Homework 3

Objectives

Practice reading and applying the API documentation and developing using unit tests.

Practice implementing a class, including the process for doing so (using documented stubs and test-first programming). Practice at determining what fields are needed to implement a class. Continued practice at using an API.

Tasks

  1. Complete the assigned reading for the next session, according to the course schedule.
  2. Complete the assessment exercises over this reading on ANGEL (under Lessons → Assignments).
  3. Programming with javadocs and unit testing:
    1. In Eclipse, checkout the UnitTesting project.

      • Use the SVN Repositories view to check out this project.
    2. We completed this step in class. Create a JUnit 4 Test Case for StringMethodsPractice.
      • Name your test case class StringMethodsPracticeTest.
      • Write unit tests for shout, whisper, and holleWerld.
      • Remember, the goal is to write tests that cover “interesting” cases.
  4. Programming a word game project:
    1. In Eclipse, checkout the WordGames project.

      • Use the SVN Repositories view to check out this project.
    2. Continue following the WordGames instructions.

      • We completed the first part of this homework in class.
      • You should complete at least the first 4 classes (Shouter, Censor, NameDropper, Counter ) before the next class period.
      • Some of the later classes require conditionals and loops; we will discuss those concepts in the next class session.
      • The entire WordGames project is due at the beginning of Session 5 (that is, not the next class period, but the one after that).
      • Use the PROCESS in the WordGames instructions: documented stubs and test-first programming.
      • The grading rubric for WordGames appears at the top-right of the WordGames instructions.
  5. Written Problem: Draw your answers to this problem neatly on paper. Clearly label each part of the problem.

    The ObjectReferenceExamples class contains several methods. For each method (except main()):

    1. Draw a box and pointer diagram, like we did in class, showing the result of running the method.
    2. Use your drawings to predict the output of the method.
    3. After you have made your predictions, run the program to check your answers.
    4. If your prediction was wrong, neatly line through it (and your drawing if necessary) and add the correct answer. We won't take off points for such edits, but we want to see your thought process.

Remember, in all your code:

Here is the grading rubric for this assignment.

Turn-in Instructions

Turn-in your programming work by committing it to your SVN repository. Bring your paper problems to class.