Question: A one-variable quadratic expression is an arithmetic expression of the form ax2+bx+c, where a, b, c are some fixed numbers (called the coefficients) and x
A one-variable quadratic expression is an arithmetic expression of the form ax2+bx+c, where a, b, c are some fixed numbers (called the coefficients) and x is a variable that can take on different values. Specify, design, and implement a class that can store information about a quadratic expression. The default constructor should set all three coefficients to zero, and another member should allow you to change these coefficients. There should be constant member function to retrieve the current values of the coefficients. There should also be a member function to allow you to evaluate the quadratic expression at a particular value of x(i.e., the function has one parameter x, and returns the value of the expression ax2+bx+c). Note: Do not overload the function.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
