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

  Solve the linear model

Select five values for x to plug into the linear function, P(x)=10x-7 and prepare a table of values

  Identify the sample and suggest a population

Identify the sample and suggest a population

  Evaluate the ratios

Evaluate the ratios and check are the ratios equivalent.

  Define variables and profit function

Define variables and profit function

  Make a linear equation

Assume you have a lemonade stand, & when you charge $1 per cup of lemonade you sell 50 cups. But when you raise your price to $2 you only sell 25 cups. Make an equation for the number of cups you sell as a function of the price you charge. Denote "C"..

  Classify linear and non linear functions

For each of the relationships given below, describe whether you think it is best explained by a linear function or a non-linear function.

  Which of the following are functions

Which of the following are functions?  The two problems, i.e., 1 & 3, are multi part relations consider all parts when determining whether or not these relations are functions. Explain your reason for 1, 2, & 3.

  Using venn diagram for solving word problems

Using venn diagram for solving word problems.

  Joint probability density function

The joint probability density function.

  Applications of combination

Applications of combination

  Solving problems using venn diagram

Solving problems using venn diagram.

  Solving problems into equation

Solving problems into equation.

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