The roots of the quadratic equation ax 2 + bx + c = 0, a ≠ 0 are given by the following formula:
![]()
In this formula, the term b 2 − 4ac is called the discriminant . If b 2 − 4ac = 0, the equation has a single (repeated) root. If b 2 − 4ac > 0, the equation has two real roots. If b 2 − 4ac <0, the equation has two complex roots. Design and implement the class quadraticEq so that an object of this class can store the coefficients of a quadratic equation. Overload the operators + and - to add and subtract, respectively, the corresponding coefficients of two quadratic equations. Overload the relational operators == and != to determine if two quadratic equations are the same. Add appropriate constructors to initialize objects. Overload the stream extraction and insertion operator for easy input and output. Also, include function members to determine and output the type and the roots of the equation. Write a program to test your class.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.