$24
In this homework, you will write your first Java program.
Write a Java class that represents a polynomial such as
Your class will keep the coefficients (ai, i=0...n ) of the polynomial.
You will design your class methods and fields yourself. However, your class shoud have the following capabilities
It can take a double array to set all of the coefficients.
It can return a double array that contains all of the coefficients.
It can set and get each coefficient separately.
Given an x value, it can evaluate the polynomial and return the result
It has methods that take another Polynomial and adds/substracts/multiplies with this polynomial and returns the result
Redefines the toString and equals methods
Test your Polynomial class with many examples and include your test results in your submission.
Use javadoc to document your classes and submit javadoc results with your java files and sample run results.