CSSE 220 – Object-Oriented Software Development

Homework 11

Objectives

Practice with arrays and ArrayLists in Java, in particular, two-dimensional arrays. 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 assigned reading for the next session:
    1. Wikipedia article on pair programming
    2. Big Java §8.1–8.4
  3. Complete the assessment exercises over this reading on ANGEL (under Lessons → Assignments).
  4. Solo programming:
    1. ArrayList practice:
      1. Complete your QuizScores class that you began in the previous homework, in the ArraysAndLists project. Use the JUnit 4 tests supplied in QuizScoresTest as tests.

        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.5, may be a helpful reference if you get stuck, as might the summary on arrays and ArrayList's.

    2. In Eclipse, checkout the TwoDArrays project.

    3. Complete the TODO items in TicTacToe and TicTacToeTest.
  5. Pair Programming: Conway’s Game of Life. Note that this part is due at the start of session 14. You'll have time to work with your partner in class during session 12. (Exam 1 is during session 13.)
    1. In Eclipse, checkout the GameOfLife project from your shared repository for this project:

      • This is a shared repository where you’ll work on Game of Life with your partner.
      • The URL for your shared repository is:
            http://svn.csse.rose-hulman.edu/repos/csse220-201020-life-teamXX
        
        where XX is your team number as given by your instructor.
      • Note: Now that you’re working with a partner, you can get hard-to-resolve SVN conflicts with your partner’s code. So please remember to do Team → Update for the project
        • when you first start working in Eclipse, and
        • whenever you are about to commit.

        If you and your partner always work together doing pair programming, then conflicts should not be a problem. (But be sure to ask for help if you get stuck.)

    2. Complete the TODO items in GameOfLife and GameOfLifeTest. The items are numbered in the order that you should complete them.
    3. Try some different initial configurations. The method getGliderList() in GameOfLifeMain generates a list representing the classic glider formation. See p. 333 of Big Java for another example.
    4. Make sure that:
      • Both team members understand all the code the team is turning in.
      • All methods are documented.
      • All TODO items are completed.
      • No errors or warnings remain.

Turn-in Instructions

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