CSSE 220 – Object-Oriented Software Development

Homework 10

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. Begin preparing for Exam 1 by reviewing the Exam 1 topics as a PDF or in Microsoft Word (same document in two forms for your convenience).
  2. Complete the very short survey on Angel:
    Lessons ~ Assignments ~ Survey for assigning partners for the Game of Life exercise
  3. Complete the assigned reading for the next session, according to the course schedule.
  4. Complete the assessment exercise over this reading on ANGEL (under Lessons → Assignments).
  5. 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, 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:

  • Write appropriate comments:
    • Javadoc comments for public fields and methods.
    • Explanations of anything else that is not obvious.
  • Give self-documenting variable and method names:
    • Use name completion in Eclipse, Ctrl-Space, to keep typing cost low and readability high.
  • Use Ctrl-Shift-F in Eclipse to format your code.
  • Take care of all auto-generated TODO's.
    • Then delete the TODO comment.
  • Correct ALL compiler warnings.
    • Quick Fix is your friend!

Here is the grading rubric for this assignment.

Turn-in Instructions

Turn in your programming work by committing it to your SVN repository.