Call the driver/client program QuadraticProg.
Write a class QuadraticFunction that represents a quadratic function ax2 + bx+c, with integer coifficients a ,b and c. Provide a constructor with three int parameters for a,b, and c. Provide a method double valueAt(double x) that returns the value of this quadratic function at x. Also provide a toString method. For example,
System.out.println(new QuadraticFunction(1,-5,6));
should display
x^2-5x+6
b) Override the equals method in the QuadraticFunction class. Two QuadraticFunctions should be considered equal it their respective coefficients are equal.
c) Make the QuadraticFunction objects Comparable. The compareTo method should first compare the a-coifficients; if equal, then compare the b-coifficients; if also equal, compare the c-coifficients. (This ordering basically defines which function will have greater values for very large x.)
For a grade higher than 90 - Define a comparator class for comparing two QuadraticFunction objects. Provide two constructors; a no-args constructor ad a constructor that takea one double parameter. When a comparator is created by the no-args constructor, it should compare two QuadraticFunctions based on their values at x=0; when a comparator is created by the contructor with a parameter x, it should compare QuadraticFunctions based on their values at x.
HAVE FUN!!!!!