Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++ Display: 1. Each of the two original polynomials 2. The sum of the polynomials 3. The difference (first minus the second) 4. Another

In C++
Display:
1. Each of the two original polynomials
2. The sum of the polynomials
3. The difference (first minus the second)
4. Another difference (second polynomials minus the first)
5. The result for each of the two polynomials being multiplied by a (different) monomial image text in transcribed
Task: Use linked lists to represent two polynomials. Each poly nomial will be an object of the Polynomial class. Each node in the linked list will represent a polynomial, so data members of the nodes will include coefficient and expo exrof th Processing: The program should accept appropriate values (i.e , coefficient and exponent values) from th verify that the integer exponents are non-negative and that coefficients are no e user to populate two polynomials. Simple data checking should t zero. Polynomials may have varying numbers of terms. The terms should be stored in the list in decreasing order of their exponents. linke For example, valid polynomials might be: 3x -1.5x4 +3 71x2-6x 12 (stored as 3 nodes) (stored as 2 nodes) (stored as 1 node) The program will perform three basic operations on the polynomials: subtract one of the original polynomials from the other one; output the difference each polynomial term by a given monomial term, not necessarily a scalar); output the add the two original polynomials together; output the sum perform monomial multiplication on one of the original polynomials (i.e., multiply monomial and the result Note: do not change the original two polynomials during the addition, subtraction or multiplication operations. Include appropriate functions in the class (constructors, etc.) to produce an effective object-oriented program Input: Be sure the program is flexible enough that polynomial terms may be supplied by the user out of proper order, but still be stored in proper order. Output: Test program should allow the user to input the two polynomials and the monomial multiplier. Then output the following. each of the two original polynomials the sum of the polynomials the difference (first polynomial minus the second) another difference (second polynomial minus the first) the result for each of the two polynomials being multiplied by a (different) monomial

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

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions

Question

Evaluate the double integral R 4xsin(xy)dA, R is 0 x , 0 y 1

Answered: 1 week ago

Question

2. Explain how the role of training is changing.

Answered: 1 week ago

Question

7. General Mills

Answered: 1 week ago