CSSE 220 – Object-Oriented Software Development
Homework 11
Objectives
Practice with arrays and ArrayList
s 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
- 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).
- List the topics that you are uncertain about, and bring that list and your questions to class.
-
Complete the assigned reading for the next session:
- Wikipedia article on pair programming
- Big Java §8.1–8.4
- As you read, see if you can answer the self-check questions (for the Big Java reading).
- Bring your questions to class!
-
Complete the assessment exercises over this reading on ANGEL (under Lessons → Assignments).
- Note that there are TWO assessment exercises: one for each of the two reading assignments above.
-
Solo programming:
-
ArrayList practice:
-
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.
-
In Eclipse, checkout the TwoDArrays project.
-
Complete the
TODO
items in TicTacToe
and TicTacToeTest
.
-
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.)
-
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.)
-
Complete the
TODO
items in GameOfLife
and GameOfLifeTest
. The items are numbered in the order that you should complete them.
-
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.
-
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.