Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Your focus in this assignment will on the implementation of the Polynomial class in files polynomial.h and polynomial.cpp . This class stores the set of
Your focus in this assignment will on the implementation of the Polynomial class in files polynomial.h and polynomial.cpp This class stores the set of coefficients that define a polynomial egxx
Although the immediate use of Polynomial is in support of this polyfactor program, we anticipate the possibility that Polynomial may be reused in other future projects, so we want to make sure that it is designed and implemented to facilitate that reuse.
You must not change the private data members in polynomial.hYou may, if you wish, add additional private function members if doing so would aid you in completing the implementation.
You may need to change some of the public functions in polynomial.h but keep in mind that the Polynomial class must continue to compile with the other code in this program.
Your code will be evaluated both on its ability to function correctly within the polyfactor application the systems tests and on its ability to pass the various unit tests provided.
Attached is polynomial.h #ifndef POLYNOMIALH
#define POLYNOMIALH
#include
#include
#include "term.h
This class implements a polynomial of the form
c c x c x c x
class Polynomial
public:
Polynomial;
Polynomial int b int a ;
Polynomial Term term;
Polynomial int nCoeff, int coeff;
int getCoeffint power const;
int getDegree const;
Polynomial operatorconst Polynomial& p const;
Polynomial operatorint scale const;
Polynomial operatorTerm term const;
void operatorint scale; Polynomial operatorconst Polynomial& p const;
private:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started