Question: a. Design a Python class named LinearEquation for a system of 22 linear equations: ar + by = cx + dy The class should contain:
a. Design a Python class named LinearEquation for a system of 22 linear equations: ar + by = cx + dy The class should contain: The data fields a, b, c, d, e and A constructor with the arguments a, bc, d,e and f. A method named isSolvable that returns true if ad - bc is not The method getXYO) that retums the solution for the equation b. Design another class HomogenEquation, which is a child class of Linear Equation. This class inherits all attributes and methods of parent class Linear Equation. But the values e and fare always set to 0 Update getXYO) So that it returns trivial solution (xy-0) ifad-be is not, and it returns any out of infinite solutions if ad - he is 0 (randomly generate this solution) c. Write a test program that prompts the user to enter a, b, c, d,e and fand displays the solution. If the equation is not solvable, report that "The equation has no solution". If the user enters -- then create an instance of HomogenEquation, compute and display the solution
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
