Answered step by step
Verified Expert Solution
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 Polynomial Class: Marks
Implement the following polynomial class:For example, a polynomial: would be stored as:
coeffArray degreeArray terms
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
Post decrement all exponents of the polynomial using
Create a Menu to test all functionalities using switch statement.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started