Modify the test for quadratic function: use the class Polynomial