class Function
{
    public:
    virtual double compute(double value) =0;
    virtual double differenciate(doublevalue) = 0;
    virtual double integrate(double value) =0;
};
class Sine : public Function
{
    public:
    double compute(double value); // computesin(x) for a given x
    double differenciate(double value); //compute derivative sin'(x) for a given x
    double integrate(double value); //integrate sin(x) for a given x
};
class Tangent : public Function
{
    public:
    double compute(double value); // computetan(x) for a given x
    double differenciate(double value); //compute derivative tan'(x) for a given x
    double integrate(double value); //integrate tan(x) for a given x
};
The classes represent mathematical functions, where eachfucntion f(x) (e.g. sine, tangent) can becomputed, differenciated and integrated for a given x.
Write a method named productRule to compute thederivative of a product of any two functions. Using the notationf’(x) to indicate the derivative of functionf(x), the derivative of the productf(x)*g(x) is defined asf(x)*g’(x)+g(x)*f’(x), where f(x)and g(x) are any two given functions, andf’(x) and g’(x) are functionderivatives, respectively. Your method should be applicable to anytwo functions derived from the Function interface.An example of the mehod call is given below:
Sine sin;  // the sine function
Tangent tan;   // the tangent function
double answer = sin.productRule(tan,5.3);    // compute the derivative ofsin(5.3)/tan(5.3)
Use C++98