CSSE 220 – Object-Oriented Software Development
Homework 10
Objectives
More practice with loops, graphics and debugging in Java. Also
2D arrays and testing. Pair Programming.
Tasks
-
Complete the assigned reading for the next session: §10.1–10.5.As you read, see if you can answer the self-check questions. If there is something you do not understand, make note of it so you can ask about it.
-
Answer the questions in the Quiz on ANGEL for the reading
assignment. Youl'll find it in
Lessons → Big Java Reading Quizzes
. Of course, this quiz is "Open Book", and you get a second
try if you wish to improve your score. Your last submission
is the one that will count.
-
Note any questions that you have in preparation for the Exam on
Thursday. Bring them to class for the exam "review". I’m also happy to work example problems
if you pick them out.
-
Solo Programming (due 8:05 on the day of Session 11):
-
Your programming work for this part must be done in the
GUIExcursion
project inside Eclipse, which you checked out in Session
9.
-
(8 points)
Modify the MouseDotComponent class so that it keeps track of all of
the points that have been clicked, and draws a line
between each pair of successive points.
-
(5 point bonus) Double-clicking should "close up" a
polygon by connecting the last point clicked (before the
double click) to the first point clicked. After a
double-click, the program should no longer draw anything
in response to mouse clicks in the component.
Note: This is not a trivial
extension. You will have to do some research on how to
detect double clicks.
-
Pair Programming (due 8:05 on the day of Session 13) :
Note that HW 11 may also have a small solo programming
assignment due at the same time.
(24 points) Conway’s Game of Life
(See Big Java page 332-333).
-
Use the
SVN Repository Exploring
perspective to
add a new SVN repository
to your Eclipse workspace. 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.cs.rose-hulman.edu/repos/csse220-200920-lifeMN
where
MN
is your team number as given by your instructor.
-
Your programming work for this part must be done in the
GameOfLife
project inside Eclipse. Check out this project from your
shared
SVN repository.
-
Note: Now that you’re working with a partner, you can
accidentally get hard-to-resolve SVN conflicts with your partner’s code. So please
remember to do
Team → Update
-
each time you start working in Eclipse, and
-
when 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 with
conflicts) .
-
(21 points for parts d-f)
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.
An example that I particularly like is the Harvester,
which you can see by going to
http://www.michael-hogg.co.uk/game_of_life.php and
choosing Harvester from the Patterns drop-down list.
-
Add to your program a means of choosing among a few
pre-defined initial cell configurations. It is
okay if the choices are displayed and the user input
collected via the console input/output, but you can also
feel free to get that information via the GUI.
-
(3 bonus points) Give your program a mode that
allows the user to click on the board to provide an
initial configuration before running the Life
simulation.
-
(3 points -- A separate ANGEL gradebook entry) After you
have finished the program, each partner should fill out
the Life Partner Survey on ANGEL. The survey will
ask you about your pair programming experience and about
whether your partner(s) participated fully and
constructively.
-
Make sure that:
-
Both team members understand all the code the team is turning in.
-
All methods are documented.
-
Good programming style.
-
All
TODO
items are completed.
-
No syntax errors remain.
-
The program does what it is supposed to do.
Turn-in Instructions
We will grade your Wiki contributions using ANGEL. Turn-in your programming work by committing it to your SVN repositories.