Write a declaration for a polynomial class


Discussion:

Q: A polynomial of degree n has the form

a0=a1x=a2x2=.....anxn

Where are numeric constants called the coefficients of the polynomial and #0.

Q1. Write a declaration for a Polynomial class whose data members are an integer for the degree and an array for the list of coefficients and with basic operations of input and output.

Q2. Implement the input operation in Question 1

Q3. Implement the output operation in Question 1. Display the polynomial in the usual mathematical format with displayed as x^n.

Q4. Add an evaluate operation to your Polynomial class that allows the user to enter a value for x and that calculates the value of the polynomial for that value.

Q5. Add an addition operation to your Polynomial class.

Q6. Add a multiplication operation to you Polynomial class.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Write a declaration for a polynomial class
Reference No:- TGS01937355

Now Priced at $25 (50% Discount)

Recommended (93%)

Rated (4.5/5)