Question #41054

Ask the user to enter two polynomials at a time. For each polynomial, ask the user to

enter the number of terms n in the polynomial, then prompt the user n times for a pair of

integers representing the coefficient and the exponent of a term. For instance, the term

2x4 has a coefficient of 2 and an exponent of 4.

Output the input polynomials as well as the sum and product of polynomials.

A sample input/output run is as follows.

The output polynomials must be sorted in descending order of exponent. Terms of the

same exponent should be added together and the term with zero coefficients should not

be output.

4. Your toString method ought to print polynomials

A polynomial is either zero or can be written as the sum of one or more terms. Each term

consists of a coefficient and an exponent.

enter the number of terms n in the polynomial, then prompt the user n times for a pair of

integers representing the coefficient and the exponent of a term. For instance, the term

2x4 has a coefficient of 2 and an exponent of 4.

Output the input polynomials as well as the sum and product of polynomials.

A sample input/output run is as follows.

The output polynomials must be sorted in descending order of exponent. Terms of the

same exponent should be added together and the term with zero coefficients should not

be output.

4. Your toString method ought to print polynomials

A polynomial is either zero or can be written as the sum of one or more terms. Each term

consists of a coefficient and an exponent.

Expert's answer

Dear customer,

Unfortunately, your question requires a lot of work and cannot be done for free.

Please submit it with all requirements as an assignment to our control panel and

we'll assist you.

Unfortunately, your question requires a lot of work and cannot be done for free.

Please submit it with all requirements as an assignment to our control panel and

we'll assist you.

## Comments

## Leave a comment