Question: Please create the following JAVA CLASS POLY with the given requirements. Add documentation on what the methods and constructors do and what the attributes are

Please create the following JAVA CLASS POLY with the given requirements.
Add documentation on what the methods and constructors do and what the attributes are for.
Poly: + This class will model a polynomial of the form: Axn-1 Bxn-2 ... Ux +Wx? + Yx + Z. It has one constructor that takes an array of double coefficients of size n (n > 0). 1.e., you can assume that only non-empty arrays will be passed to the constructor. For example, to make the polynomial 4x2 + 3x - 2, it should be made this way new Poly(new double[] {4, 3, -2}). The same polynomial could also be made this way new Poly(new double[]{0, 0, 0, 4, 3, -2}). You are free to store these parameters however you choose. Poly has a method called evaluate() . This method will return the double value of the polynomial evaluated for a given x (you can tap into java.lang. Math > for some handy maths operators). Poly has a method called printPoly(). This method should print the polynomial out in the form mentioned above: ax + bx2 + cx + d. However, terms with o coefficients should be omitted. For example, the polynomial 5.5x3 - 3.1x + 3 should be printed as: "5.5x^3 3.1x^1 + 3.0". If the Poly has all O coefficients, print an empty String. You can define accessor methods for Poly and keep track of any other attributes you like
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
