Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 5 Polynomial Class: [ 3 0 Marks ] Implement the following polynomial class:For example, a polynomial: 4 x 6 - 2 x 3 +

Task 5 Polynomial Class: [30 Marks]
Implement the following polynomial class:For example, a polynomial: 4x6-2x3+6x2+1 would be stored as:
coeffArray =[4-26], degreeArray =[632], terms =4
Make sure that the degree array is sorted in descending order so that the highest power
term appears first. Also, there should be no duplicates in the degree array and it should
only be allocated according to the total terms present in the polynomial.
Implement the following in MyPolynomial class
a) Constructor, parametrized constructor, destructor and deep copy constructor.
b)+ operator for the addition of two polynomials.
c)- operator for subtracting one polynomial from another.
d)* operator for multiplying two polynomials.
e)= assignment operator.
f)== comparison operator.
g) operator.
h) Input the polynomials using .
i) Print the polynomials using .
j) Pre increment all the coefficients of the polynomial using ++.
k) Pre decrement all the coefficients of the polynomial using --.
Post increment all exponents of the polynomial using ++.
m Post decrement all exponents of the polynomial using --.
Create a Menu to test all functionalities using switch statement.
image text in transcribed

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 1 Lnai 9284

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Carlos Soares ,Joao Gama ,Alipio Jorge

1st Edition

3319235273, 978-3319235271

More Books

Students also viewed these Databases questions

Question

I am paid fairly for the work I do.

Answered: 1 week ago

Question

I receive the training I need to do my job well.

Answered: 1 week ago