ComplexFunction - MaayanZeevi/OO_Ex1 GitHub Wiki

This class represents a complex function of type y=g(f1(x), f2(x)), while both f1(x) and f2(x) could be instance of polynomial or another complex function.

The class Polynom supports some functions as:

  • Constructors:
  1. Without arguments, build empty instance
  2. Init from enum and two functions(could be instance of Monom/Polynom/another ComplexFunction)
  3. Init from string(the enum) and two functions
  4. Init from one function
  5. Init from string
  • Plus:Performs a Plus operation on two functions
  • Times:Performs a multiplication operation on two functions
  • Divid:Performs a Divid operation on two functions
  • Max: getting the max value between f1(x) and f2(x)
  • Min : getting the min value between f1(x) and f2(x)
  • Comp:Performs function-by-function assembly F (G (x))
  • f(x) -Calculates the value of the complex function at a point
  • is equal- checking if two complex function are equals