Add an evaluate operation to your polynomial class that


Exercise 6.3: A polynomial of degree n has the form

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

For example:

is a polynomial of degree 4 with integer coefficients 1, 3, 0, -7 and 5. One common implementation of a polynomial stores the degree of the polynomial and the list of coefficients. This is the implementation to be used in the exercises that follow. As you add the various operations to the Polynomial class you are building, you should also write a program to test your class.

1. 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.

2. Implement the input operation in Question 1

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

4. 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.

5. Add an addition operation to your Polynomial class.

6. Add a multiplication operation to you Polynomial class.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Add an evaluate operation to your polynomial class that
Reference No:- TGS01247053

Now Priced at $20 (50% Discount)

Recommended (91%)

Rated (4.3/5)