Comp 212 Homework 2
Array Implementation of Polynomials
Due Friday Mar. 03, 2000 10:00 AM.
This homework exercise serves as an exercise on arrays. It is based on the
Polynomial example done in homework #1 and the addition of the visitor pattern to
APolynomial as discussed in class.
Examine the given
design and documentation for an implementation of polynomials using array. Reuse
the code for APolynomial
and all the visitors as discussed in class.
- Write the code for PolyFactory and ArrayPoly as specified in the documentation.
You are free to add any number of private methods to ArrayPoly and PolyFactory, but do not
- Rewrite the div and mod operation as visitors. Feel free to make use of the
solution to homework #1.
- Write a client program to test your implementation and to illustrate that all existing
visitors would run correctly unchanged.
The homework is due Friday March 03, 2000 at 10 AM. It is to be submitted
electronically. Your labbies will give you specific submission instructions in the
upcoming lab tutorial. No late submission will be accepted. The complete
homework set should contain the following:
- An ASCII README file to indicate what you have and/or have not done, and
to point out specific details that you feel we need to know when grading your work.
- All the Java source code necessary to compile and execute your test code.
email@example.com firstname.lastname@example.org Please
let us know of any broken links Revised Feb.