Read [Gray], Chapters 0, 1, and Chapter 2 up through 2.2 only. Consider the "Checkpoint" questions as part of your reading assignment: answer them but don't turn in your answers. Also read [Bloch], items 1-5, 7-9, 13, and 31.
Submit answers to the following problems, in a nicely typeset pdf file:
double. Override equals, hashCode,
and toString.
You will be creating a document that contains numbered solutions to the problems, using LaTeX, OpenOffice, Word, or other document preparation system. If a particular problem asks for source code, you may embed the source in place in the document, or give the answer as "See <filename>" and place the source code at the end of the document. Compose the pdf with the solutions to each problem, numbered, and in order. You must submit a hard copy of the pdf and the source code in one packet of stapled together 8.5" × 11" sheets of paper. You must also make available source code in electronic form, either by emailing me a zip file containing the sources, or by providing me readonly access to a cvs or svn repository, where I can check out code by date.
Your sources should be organized as follows:
homework
cmsi281
src
main
docs
hw1.tex (or .odt or .doc or ...)
<diagram source files>, if any
<images>, if any
java
edu
lmu
cs
geometry
Point.java
Line.java
games
Card.java (contains inner classes Suit and Rank)
test
java
edu
lmu
cs
geometry
PointTest.java (JUnit test case)
LineTest.java (JUnit test case)
games
CardTest.java (JUnit test case)
Notes