Computer Science APEA 15-100, Summer 2009
Homework 10
Due: Thu 16-Jul-2009 at 11pm (email copy only)
(no late submissions accepted).
Read these instructions first!
- Now you are not given a file to start from! Based on previous
hw's, create your own Hw10.java file. Be sure to name it exactly
correctly, to include a main method that calls checkAssertsAreEnabled and
testAll, and to have testAll call suitable test methods for all the methods
you create. Also, be sure that every method you write has exactly the
right name and the right signature.
- Be sure to include your name, your Andrew ID, and your section clearly on the top of each file in your assignment.
- For non-programming problems:
- Place all your solutions to the non-programming problems in a single
file named Hw10 (with whatever extension is appropriate for the format you
choose, such as Hw10.txt or Hw10.html, etc). You must use one of these
file formats: plain text (txt), or RTF, or HTML, or Word (doc, not docx), or
PDF. No other file formats will be accepted.
- Show your work. Correct answers without supporting
calculations will not receive full credit.
- For programming problems:
- Try to use well-named variables, proper indenting, reasonable commenting,
etc.
- Note: You may not use Java concepts we have not yet covered,
including l
oops (do/while/for), conditionals
("if" statements or tertiary operators (?:)), arrays, or methods
from any classes in java.util.* (besides Scanner or others we explicitly
use) to solve these problems
(which isn't a problem for most of you, seeing as we have not yet covered
these!). While they may be helpful, every problem here is solvable without
them, and they are not permitted for now.
- What to submit
- Create a submission directory like this: "koz-hw10" (replace
"koz" with your andrew id)
- Place all the files you are submitting in that directory, zip that
directory, and submit the zipped directory
- How to submit
- Send an email with the zipped submission directory as an attachment
to your CA by the submission deadline. Do not miss the deadline,
even by one minute! Email problems are not a valid excuse
for late submissions.
- It is recommended
that you "cc" yourself in that email, too, just to confirm that you properly
sent the email.
- Note:
- Improper submissions will be penalized up to 10 points and may be
rejected.
- Late submissions will be rejected.
- Finish Lab 10
- Finish Lab 10
Finish all the examples (that is, the Checkers game) from lab 10. Include the solutions in your
submission, all in one file named Lab10.java. Note: the lab collaboration
policy continues to apply to the lab problems. So you can collaborate at
will to solve these problems. This only applies to the lab problems -- all
other problems in this assignment are subject to the usual homework
collaboration policy.
To complete this assignment, you need to write:
- A checkerboard (you've done this before!)
- A 2d array representing the board
- Legal moves
- Jumps (no double jumps- yet!)
- A few simple key options (reset, quit, etc.)
- Game ending
- Kinging/crowning pieces (paint a star in the middle of the circle,
rather than a rectangle)
Carpe diem!