A system of linear equations can be solved using Cramer’s rule as following: The class contains: Data fields and a, b, c, d, e, f. A method named that returns true if ad - bc is not 0. isSolvable() Methods and that return the solution for the solveX() solveY() equation. Draw the UML diagram for the class and then implement the class. Write a test program that prompts the user to enter and a, b, c, d, e, f and displays the solution. If is report that ad - bc 0, system has no ”The solution.” Sample Run 1 Enter a, b, c, d, e, f: 9 4 3 -5 -6 -21 x is -2.0 and y is 3.0 Sample Run 2 Enter a, b, c, d, e, f: 1 2 2 4 5 5 The system has no solution UML Unlike previous program, in this program we are going to solve everything at once, i.e., write the whole class at once. First phase is to design your program as an OOP program. Draw UML diagrams for the two classes, LinearEquation and TestLinearEquation.
A system of linear equations can be solved using Cramer’s rule as following: The class contains: Data fields a, b, c, d, e, and f. A method named isSolvable() that returns true if ad - bc is not 0. Methods solveX() and solveY() that return the solution for the equation. Draw the UML diagram for the class and then implement the class. Write a test program that prompts the user to enter a, b, c, d, e, and f and displays the solution. If ad - bc is 0, report that ”The system has no solution.” Sample Run 1 Enter a, b, c, d, e, f: 9 4 3 -5 -6 -21 x is -2.0 and y is 3.0 Sample Run 2 Enter a, b, c, d, e, f: 1 2 2 4 5 5 The system has no solution UML Unlike previous program, in this program we are going to solve everything at once, i.e., write the whole class at once. First phase is to design your program as an OOP program. Draw UML diagrams for the two classes, LinearEquation and TestLinearEquation.
second_oop_lab.docx