CSSE 220 – Object-Oriented Software Development

Homework 8

Objectives

Practice with arrays and ArrayLists in Java. More practice with loops and debugging in Java. More practice implementing classes based on a given specification.

Tasks

  1. Complete the assigned reading for today's session (Session 8: Big Java, §7.1–7.6), according to the course schedule.
  2. Complete the assessment exercise over this reading on ANGEL (under Lessons → Assignments).
  3. Programming:
    1. In Eclipse, checkout the ArraysAndLists project.

    2. With your instructor, discuss the specification and complete the design for the RollingDice program.

      Implement the TODOs in RollingDice in order.

    3. ArrayList practice:
      1. We have created documented stubs of a constructor and several methods in the QuizScores class. Implement these documented stubs, testing each using the JUnit 4 tests supplied in QuizScoresTest.

        Note the implementation requirements for the QuizScores exercise:

        • Use an ArrayList<Integer> to store the scores.
        • Use the enhanced for loop where practical.
        • Do NOT use methods from Arrays or Collections in the QuizScores class.

        Big Java, §7.6 (7.5 in ed3), may be a helpful reference if you get stuck, as might the summary on arrays and ArrayList's.

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.