Create a class polynomial and a corresponding test class

Assignment Help Algebra
Reference no: EM13924056

Create a class Polynomial and a corresponding test class that is used to evaluate a polynomial function of x: P(x) = a0 + a1 * x + a2 * x ** 2 + ......+an * x ** n; ai is coefficient i, and x ** n means x to the power of n The coefficients ai, are of type double, and the exponents of x are integers. The largest exponent n is called the degree of the polynomial which is an integer >= zero. The class has the attributes: degree, the value of the largest exponent n. coefficients, an array of coefficients ai. And the following methods: Polynomial (max), which is a constructor that creates a polynomial of degree max with all "degree plus one" coefficients of zero. setConstast(i, value), sets the coefficient ai to value. evaluate(x), returns the value of polynomial for the given x. For example, p(x) = 3 + 5x + 2 * x** 3 is of degree 3, has coefficients a0 = 3, a1 = 5, a2 = 0,and a3 = 2. The invocation of evaluate(7) computes: 3 + 5 * 7 + 0 * 7 ** 2 + 2 * 7 **3 which returns 724.

Reference no: EM13924056

Questions Cloud

Effects of organizational structure on communication : Write a 350- to 700-word paper in which you address the effects of organizational structure on communication regarding the following scenario:
Hacking occurred and the organization had the right plan : Security Computer forensics and hacking go hand in hand. Discuss in (Need 2 Reports with 2 pages each report = 4 Total Pages), two cases where hacking occurred and the organization had the right plan in place to combat the hack. Describe the proce..
Cultural and linguistic differences podcast : Cultural and Linguistic Differences Listen to the Cultural and Linguistic Differences podcast from The IRIS Center, or view the transcript. Consider what Donna Ford has to say about prejudice and stereotyping. Discuss how educators can positively ..
Organizational structure presentation formal bibliography : Organizational Structure Presentation Formal Bibliography Resources: Reference and Citation Examples and the Reference and Citation Generator at the Center for Writing Excellence
Create a class polynomial and a corresponding test class : Create a class Polynomial and a corresponding test class that is used to evaluate a polynomial function of x: P(x) = a0 + a1 * x + a2 * x ** 2 + ......+an * x ** n; ai is coefficient i, and x ** n means x to the power of n
Sharing two lessons or activities : Bullying...Change Read the following essay, written by Antonio, a fourth-grade student. The Bully in the Mirror Antonio, 4th Grade Mirror Mirror on the wall why must I be the Bully that has to fall. I beat on kids around the school The mirror told..
Individual motivational methods paper : Within your organization, upper management has decided that your department must be downsized, and it is up to each manager to begin preparing his or her team for the changes. One of the changes to be addressed involves motivational techniques. As..
Number of failures per unit hour : The remaining units were still running at 60,000 hours. Determine the following: Percentage of Failures? Number of failures per unit hour? MTBF at this point in testing?
Which strategy appears to have been the riskiest and why : Consider four different stock market indexes representing different equity investment styles: Which strategy appears to have been the riskiest? Why?

Reviews

Write a Review

Algebra Questions & Answers

  Determine if variables are directly proportional

For each of the relationships described below, determine if the variables are directly proportional. Write a sentence or two for each to justify your answers.

  Make a cycle decomposition

Make a cycle decomposition

  Which expression is equivalent to (-2) (a+6)

Which expression is equivalent to (-2) (a+6)

  Transform the gx function so that the graph is moved 6

we define the following functionsfx2x5 gxx2-3 hx7-x3? compute f - h4.? evaluate the following two compositions fogx and

  Quadratic equation select a quadratic equation and solve it

select a quadratic equation and solve it using the quotcompleting the squarequot method. show your work in full

  Solve the inequality and express the solutions

Solve the inequality and express the solutions

  Find the equation of a line that passes through the point

find the equation of a line that passes through the point 07 that is perpendicular to the line with the equation y

  Properties of logarithms to increase logarithmic expression

Apply properties of logarithms to increase logarithmic expression.

  Mr lewis drew a triangle with angle measurements x 5x and

mr.lewis drew a triangle with the angle measurements x .5x and 1.5x. what is the best classification for this

  Compute the relative growth rate

Compute the relative growth rate.

  Multiply the matrices

Multiply the matrices.

  The cashews cost 8 per pound and the almonds cost 6 per

lenora bought several pounds of cahsews and several pounds of almonds for a party. the cashews cost 8 per pound and the

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd