Need to finish the asigment

i need to create a class that represents a polynom of the fourth degree with int coefficients.
Define suitable interface to the class as a constructor(s), set and get methods as functions, and funtion int calc(int x0) which gives the value to the polynom at the point x0. Redefine operation indexing[], that the given index returns the value of the respected coefficient of the polynom

Please help me out cause i dont know what to do.
i only know to begin the code like this(correct mistakes, if there are any)

1
2
3
4
5
6
constexpr unsigned NumCoefficients = 4;
class Poly {
public:
    Poly();
    int calc(int x0);
    int operator[](unsigned idx) { return coeff[idx]; }


please explain to me (noob freindly) what i need to do to finish the programme, also write what i need to put in the main() function, if there is a way to simplify my code than do that to, thank you very much
Last edited on
Topic archived. No new replies allowed.