Question: using c++ Consider the polynomial - in a single variable x-whose operations include the following: degree I/Returns the degree of a polynomial coefficient power) //

 using c++ Consider the polynomial - in a single variable x-whose
using c++

Consider the polynomial - in a single variable x-whose operations include the following: degree I/Returns the degree of a polynomial coefficient power) // Returns the coefficient of the Xpower term. chageCoefficientinewCoefficient, power) / Replaces the coefficient of the xpower term with new coefficient. For this problem, consider only polynomials whose exponents are nonnegative integers. For example, p. 45.73.2.9 The following examples demonstrate the operations on this polynomial p.degree is 5 (the highest power of a term with a nonzero coefficient) p.coeficient[3) is 7 (the coefficient of the term) p.coefficient(4) is the coefficient of a missing term is implicitly 0) p.chengeCoefficient(-3,7) produces the polynomial p=-3x? + 4x +72-x2+9 Using these operations, write statements to perform the following tasks: a) Display the coefficient of the term that has the highest power. b) Increase the coefficient of the term by 8. c) Compute the sum of two polynomials. (p and al Consider a sparse implementation of the polynomial that stores only the terms with nonzero coefficients. Complete this sparse implementation e) Define a traverse operation for the sparse implementation of a polynomial that will allow you to add two sparse polynomials without having to consider terms with zero coefficients explicitly. Test Data for a) and b) p.3x2+62+72-8x?+9.24 Test Data forck P-3.2.6x-72-8x?+9-2x4 q=9x2 - 2x - 4x + 6x+2+7x4 Test Data for d) and ep 6x10.8x25 - 22.4x8.9x+ 5x4 9 = 43x24 7x10.4x25 + 12x + 2 + 3x4 + 9x Requirements: 1) Use these test data above for your program 2) Please turn both your source code and the output. Note: Use screen print to capture the output according to the specified test data

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!