If you did not finish the reading assignment for the first homework assignment, finish it for this assignment. (It was [Gray], Chapters 0, 1, and Chapter 2 up through 2.2 only.) and [Bloch], items 1-5, 7-9, 13, and 31. The new reading for this assignment is [Bloch], items 17, 23-25, 27, and 39.
Submit answers to the following problems, in a nicely typeset pdf file:
double and
whose exponents are of type int and
non-negative. Include methods to
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
hw2.tex (or .odt or .doc or ...)
<diagram source files>, if any
<images>, if any
java
edu
lmu
cs
math
Polynomial.java (an interface)
ArrayPolynomial.java (implements Polynomial)
Rational.java (a class)
test
java
edu
lmu
cs
math
ArrayPolynomialTest.java (JUnit test case)
RationalTest.java (JUnit test case)
Notes