Home / Expert Answers / Computer Science / i-need-help-to-create-two-java-classes-one-polynomial-and-term-for-example-a-term-can-consist-of-3x-pa788

(Solved): I need help to create two JAVA classes one Polynomial and Term For example: A Term can consist of 3x ...



I need help to create two JAVA classes one Polynomial and Term For example: A Term can consist of 3x^4 where exponent is 4 and coefficient is 3.

Similarly, 2x^2 can consist of exponent as 2 and coefficient as 2. 

A Polynomial can be represented as below. 

3x^4 + 2x^2 + 3x + 7 

2x^3 + 4x + 5

3x^4 + 2x^3 + 2x^2 + 7x + 12

You program should be able to create, display and store polynomials.



We have an Answer from Expert

View Expert Answer

Expert Answer


Java Code: import java.util.Comparator; import java.util.Arrays; // Polynomial class class Polynomial { // expression variable to store polynomial... String expression = ""; // Polynomial constructor... public Polynomial(Term []
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe