Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Poly implements Cloneable {
- // as given before, plus
- public boolean equals (Poly q) {
- if (q == null || deg != q.deg) return false;
- for (int i = 0; i <= deg; i++)
- if (trms[i] != q.trms[i]) return false;
- return true; }
- public boolean equals (Object z){
- if (!(z instanceof Poly)) return false;
- return equals((Poly) z); }
- }
Add Comment
Please, Sign In to add comment