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, 23.06.2019 14:30
Select the correct answer. which step can possibly increase the severity of an incident? a. separating sensitive data from non-sensitive data b. immediately spreading the news about the incident response plan c. installing new hard disks d. increasing access controls
Answers: 2
question
Computers and Technology, 24.06.2019 14:00
In the microsoft® access® and microsoft excel® programs, the ribbon contains tabs that are divided into with like tools in them. parts groups containers bunches
Answers: 1
question
Computers and Technology, 24.06.2019 18:30
What is the local portion of the e-mail address below? [email protected] a.) @ b.) biz c.) gumchewer d.) twrigley
Answers: 1
question
Computers and Technology, 24.06.2019 20:30
Where is permanent data in the computer stored whenever gym starts his laptop he sees some commands in numbers appearing on the screen these instructions are being preceded by the control unit in
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
Arts, 03.03.2020 19:23