Q1 Quadratic equations are the polynomial equations of degree 2 in one variable of type f(x) = ax2 + bx + c where a, b,
Posted: Wed Apr 27, 2022 3:38 pm
Q1 Quadratic equations are the polynomial equations of degree 2 in one variable of type f(x) = ax2 + bx + c where a, b, c, ER and a t 0. Ius the general form of a quadratic equation where 'a' is called the leading coefficient and 'c' is called the absolute term off (x). The values of x satisfying the quadratic equation are the roots of the quadratic equation (a,b). The solution or roots of a quadratic equation are given by the quadratic formula: (a, b) = (-b V(b2 - 4ac)]/2a a) Design a class QuadraticEq to store quadratic equation information, all attributes should be private and accessible through getter and setters. b) Make multiple constructors, both parameterised and default, such that we can create instance with passing no value, only x2. x2&xor all three values When no value is passed for any attribute consider it 0. c) Overload Stream in and Stream out operator to take input of these attributes from user and to display equation respectively. d) Overload Summation - Operator for QuadraticEq, such that both equations are added and resultant equation is returned e) Overload Subtraction - Operator for QuadraticEq, such that difference of equations is returned as resultant equation. 1) Overload post increment operator ++ for QuatradicEq. this will add one to constant conly of the equation. 8) Write a function to determine and display roots for the equation 1) What modification would you made to your class if this class would to support polynomial equations of degree n? Explain in comments all the changes required. No need to write code for part g. just explain changes Additional Information for taking square root: #include ccmath> using namespace std; int main() { cout << "Square root of 25 = "; // print the square root of 25 cout << sqrt(25): return 0; 3