Guest User

Untitled

a guest
Jan 21st, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. public class Poly implements Cloneable {
  2. // as given before, plus
  3.  
  4. public boolean equals (Poly q) {
  5. if (q == null || deg != q.deg) return false;
  6. for (int i = 0; i <= deg; i++)
  7. if (trms[i] != q.trms[i]) return false;
  8. return true; }
  9.  
  10. public boolean equals (Object z){
  11. if (!(z instanceof Poly)) return false;
  12. return equals((Poly) z); }
  13. }
Add Comment
Please, Sign In to add comment