C++ question. I am a little stuck. Thank you for the help, I will upvote Problem: Consider the ADT polynomial -- in a si

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

C++ question. I am a little stuck. Thank you for the help, I will upvote Problem: Consider the ADT polynomial -- in a si

Post by answerhappygod »

C Question I Am A Little Stuck Thank You For The Help I Will Upvote Problem Consider The Adt Polynomial In A Si 1
C Question I Am A Little Stuck Thank You For The Help I Will Upvote Problem Consider The Adt Polynomial In A Si 1 (94.91 KiB) Viewed 50 times
C++ question. I am a little stuck. Thank you for the help, I will upvote Problem: Consider the ADT polynomial -- in a single variable x -- whose operations include the following: degree() // returns the degree of the polynomial coefficient(power) // returns the coefficient of the xpower term. changeCoefficient(newCoefficient, power) // replaces the coefficient of the xpower term with newCoefficient. For this problem, consider only polynomials whose exponents are nonnegative integers. For example, p = 4x5 + 7x3 - x2 + 9 The following examples demonstrate the ADT operations on this polynomial. - p.degree() is 5 (the highest power of a term with a nonzero coefficient) -p.coefficient(3) is 7 (the coefficient of the x3 term) -p.coefficient(4) is 0 (the coefficient of a missing term is implicitly 0) - p.changeCoefficient(-3, 7) changes the polynomial p to -3x7 + 4x5 + 7x3 - x2 + 9 Question: Using these ADT operations: a) Increase the coefficient of the x term by 8 b) Compute the sum of two polynomials.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply