Polynom - MaayanZeevi/OO_Ex1 GitHub Wiki

This class represents a list of Monoms defined by the structure a1x^b1+a2x^b2+…+an*x^bn.

The class Polynom supports some methods as:

  • Constructor:
  1. Init from string.
  2. Init from another Polynom.
  3. Without arguments build empty Polynom.
  • initFromString- Create polynom object by type the polynom as a string.
  • area – Calculate the area between two point of the polynom in epsilon steps.
  • Add monom to polynom
  • multiply polynom by monom.
  • multiply polynom by other polynom.
  • Sub and add between two polynoms.
  • Derivative- returns the derivative of the polynomial.
  • is-zero (return true if the polynom is equal to zero).
  • copy (deep copy of the polynom ).
  • iterator (return monoms iterator of the polynom).
  • f- Calculate the polynomial value for x.
  • equals (return true if two polynoms are the same).
  • find the root and area (compute Riemann's integral) functions.
  • toString- returns a string (of the polynom).

this class used java ArrrayList class for the implemention