subject

In Java, design an interface named Polynomial. This is your polynomial abstract data type. It should have the following method signatures: A method addTerm that takes a coefficient and a power (both integral numbers) and adds the resulting term to the polynomial. (in order to build a polynomial term-by-term.) It should throw an IllegalArgumentException if a negative power is passed to it.
A method removeTerm that takes a power and removes any and all terms in the polynomial with that power.
A method getDegree that returns the degree of this polynomial.
A method getCoefficient that takes a power and returns the coefficient for the term with that power.
A method evaluate that takes a double-precision decimal number and returns a double-precision result.
A method add that takes another Polynomial object and returns the polynomial obtained by adding the two polynomials. Ensure that this method does not mutate either polynomial. The implementation may assume that the given Polynomial is the of the same concrete class as this object; if it is a different class, the method may throw an IllegalArgumentException.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 02:20
Peter is thinking of a number which isless than 50. the number has 9 factors.when he adds 4 to the number, itbecomes a multiple of 5. what is thenumber he is thinking of ?
Answers: 1
question
Computers and Technology, 24.06.2019 18:30
These factors limit the ability to attach files to e-mail messages. location of sender recipient's ability to open file size of file type of operating system used
Answers: 1
question
Computers and Technology, 25.06.2019 04:30
Which relativos possible when two tables share the same primary key? a.) one-to-one b.) one-to-many c.) many-to-one d.) many-to-many
Answers: 2
question
Computers and Technology, 25.06.2019 07:30
What does the hard disk drive do? it stores all of the information on a computer. it controls a computer’s operating system. it enables visual interaction with a computer. it contains all of a computer’s internal parts.
Answers: 1
You know the right answer?
In Java, design an interface named Polynomial. This is your polynomial abstract data type. It should...
Questions
question
Mathematics, 22.03.2021 18:40
Questions on the website: 13722360