Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need the C++ code of this excercise You will implement and test a polynomial class, using fixed-sized array as the data structure to store the

Need the C++ code of this excercise image text in transcribed
You will implement and test a polynomial class, using fixed-sized array as the data structure to store the terms in a polynomial. Each term in the polynomial is also a class that you will need to implement. Recall that the general form of a polynomial is as follows: P(x) = anx" + an-1x"-| + + aix + ao Here, each term has a coefficient, denoted as a, and a exponent i, which represent the power of the variable x. Your polynomial class must implement the following operations: Addition-given two polynomials P and P , compute the polynomial F-P + Subtraction-given two polynomials P and R, compute the polynomial -R- 3. Multiplication - given two polynomials P and P, compute the polynomial P,-P*P 5. Indefinite integral -given a polynomial P, finds its indefinite integral (anti-derivative). 1. 2 4. Derivative- given a polynomial P, finds its derivative. 6. Definite integral given a polynomial P, evaluate its definite integral over an interval [a,b] 7. 8. Degree-given a polynomial P, find its degree (the largest exponent in any term). Evaluate- given a polynomial P, evaluate it at value x, to compute y- P(r) You must first implement the polyterm class, which implements a term in a polynomial. You will use a fixed-size array to store the terms in the polynomial, in decreasing order of exponent. Thus, each element in the array represents a term in the polynomial. The array will have a maximum size CAPACITY that limits the number of terms that can be added to the polynomial

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Ultimate Database For Cloud Analytics And Mobile

Authors: John Campbell, Chris Crone, Gareth Jones, Surekha Parekh, Jay Yothers

1st Edition

ISBN: 1583474013, 978-1583474013

More Books

Students also viewed these Databases questions

Question

List the advantages and disadvantages of the pay programs. page 505

Answered: 1 week ago