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

  Find an orthogonal basis

Find an orthogonal basis

  Make a graph for quadratic function

Make a graph for quadratic function.

  Question regarding proportionality constant

To estimate gorilla populations, biologists count the total number of gorillas in a small section of their habitat. The total population of gorillas is directly proportional to the size of the habitat (in acres) polled.

  Weekly fixed and variable costs of picnic tables

A small company manufactures picnic tables. The weekly fixed cost is $1,200 and the variable cost is $45 per table. Find the total daily cost of producing X picnic tables. How many picnic tables can be produced for a total weekly cost of $4,800?

  Mr randolph finds that the supply and demand for gasoline

mr. randolph finds that the supply and demand for gasoline at his station are generally given be the following

  Evaluate the budget costs of the firm from the 2300th

evaluate the budget costs of the firm from the 2300th entry to the last item on the list. source document will be sent

  Find an equation of the line having the specified slope and

find an equation of the line having the specified slope and containing the indicated point. write your answer in

  Calculate the average cost function

Calculate the average cost function.

  Show how you can use these to find the general form

D2. Explain the relationship between the x and y intercepts and the general form of a quadratic function. Then demonstrate this relationship in the following:

  Simplify statement form as a tautology

Simplify every statement form as a tautology, a contradiction, or neither.

  Question about exponential function

Suppose that the number of cars, C, on 1st Avenue in a city over a period of time t, in months, is graphed on a retangular coordinate system where time is on the horizontial axis.

  Solve the formula

Solve the formula

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