Question: Use Python Programming. Design a class named Quadratic Equation for a quadratic equation ax + bx+c 0. The class contains: The data fields a, b,
Use Python Programming. 
Design a class named Quadratic Equation for a quadratic equation ax + bx+c 0. The class contains: The data fields a, b, and c that represent three coefficients. . An initializer for the arguments for a, b, and c. Three getter methods for a, b, and c. A method named get Discriminant() that returns the discriminant, which is b- 4ac The methods named getRoot 1() and getRoot 2() for returning the two roots of the equation using these formulas: r1 ----7-400 and r2 --b* V62-4ac These methods are useful only if the discriminant is nonnegative. Let these methods return None if the discriminant is negative. Write a test program that prompts the user to enter values for a, b, and c and displays the result based on the discriminant. If the discriminant is positive, display the two roots. If the discriminant is o, display the one root. Otherwise, display "The equation has no roots
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
