Question: Important note: Assignments are individual work. We will use software solutions to automate the process of checking similarity between student submissions for further inspection by
Important note: Assignments are individual work. We will use software solutions to automate the process of checking similarity between student submissions for further inspection by the professor. Similarity of your submission with any public solution will also be investigated. We can represent a polynomial as a list of terms, where the terms are in decreasing order by exponent. You should define a class Term that contains data fields coef and exponent. For example, -5x has a coef value of -5 and an exponent value of 4. To add two polynomials, you traverse both lists and examine the two terms at the current iterator position. If the exponent of one is smaller than the exponent of the other, then insert the larger one into the result and advance that list's iterator. If the exponents are equal, then create a new term with that exponent and the sum of the two coefficients, and advance both iterators. For example: (3x +2x + 3x + 7) + (2x + -5x +5) =3x + 2x + 2x -2x + 12 What to do? Write a polynomial clas
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
