Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

please provide full answer with comments this is just begining course of c++ so

ID: 3846206 • Letter: P

Question

please provide full answer with comments this is just begining course of c++ so don't use advanced tequenicks I'll put main.cpp, polynomial.h, polynomial.cpp and Cimg.h at the bottom of pictures. If you help me with this will be greatly thankful thank you

main.cpp

polynomial.cpp

polynomial.h

http://www.math.ucla.edu/~eryu/courses/pic10a/hw/hw9/CImg.h

Download the starter code main. cpp, polynomial.h, polynomial.cpp, and CImg h. You will have to modify the header file but you may not change the signatures of the provided public methods of class polynomial. You are free to add any public and/or private members.) We have provided main.cpp to give you an idea of how we intend to use the functions. Put the implementations into the files polynomial. h and/or polynomial.cpp. All files you submit must not contain a main function You may not use global variables. You may not use the using-directive, using namespace std; You may not use #pragma once. You may not use any libraries aside from cassert, crnath, iostream, algorithm, vector, string, and CImg.h. We may take off up to 20 of the total marks for poor style; make sure to name your variables reasonably, indent properly, and comment sufficiently. Submit polynomial h and polynomial.cpp. In hw7 and hw8, we've forced you to put all function definitions into cpp files. However, there's nothing wrong with putting very short definitions into header files and putting only the long definitions into cpp files Problem 1: (Polynomial) Write a class that represents a polynomial The constructor pol y nom ial (double c 0.0); creates a polynomial that corresponds to p(a) The method int degree returns the degree of the polynomial. (For the purpose of this assignment, let's say the zero polynomial p(ar) 0 is degree 0. The method nonzero Terms int returns the number of nonzero terms of the polynomial. For example, 1 has 2 nonzero terms. The procedure void set Coeff int deg double c) sets the coefficient of the term deg to c. Calling this function can increase or decrease the degree of the polynomial. assert that deg is nonnegative The method

Explanation / Answer

main.cpp

polynomial.cpp

polynomial.h