akosiraff

Download Quadratic

Jul 27th, 2015
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1.  
  2. Download: http://solutionzip.com/downloads/quadratic/
  3. A one-variable quadratic expression is an arithmetic expression of the form ax2+bx +c, where a, b, and c are some fixed numbers (called coefficients) and x is a variable that can take on different values. 1. Specify, design and implement a class named Quadratic that can store information about a quadratic expression. The constructor should set all three coefficients to zero, and another method should allow you to change these coefficients. There should be accessor methods to retrieve the current values of the coefficients. There should also be a method to allow you to evaluate the quadratic expression at a particular value of x, that is, the method has one parameter x and returns the value of the expression ax2+bx +c. Also write the following methods to perform these indicated operations: public static Quadratic sum(Quadratic q1, Quadratic q2) // Post-condition: The return value is the quadratic expression obtained by adding // q1 and q2. For example, the c coefficient of the return value is the sum of q1’s c // coefficient and q2’s c coefficient. public static Quadratic scale(double r, Quadratic q2) // Post-condition: The return value is the quadratic expression obtained by //
  4. Download: http://solutionzip.com/downloads/quadratic/
Add Comment
Please, Sign In to add comment