Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please solve in Java C code. Will like it upon completion! Program Requirements This assignment is to solve a system of components with unknown variables.
Please solve in Java C code. Will like it upon completion!
Program Requirements This assignment is to solve a system of components with unknown variables. As one example, this could be finding unknown values in a circuit. A matrix is important when designing and solving electrical engineering and structural engineering problems. In this system of components, the following equations make it easier to solve: a11x+a12y+a13z=b1a21x+a22y+a23z=b2a31x+a32y+a33z=b3 The a11, a12, ... values are coefficients. The variables, x,y, and z are unknown. Write a method that solves the matrix using the equations and displays the result, which is x,y, and z : public static double|| solveMatrix(double|II| arrayA, double|| arrayB) x=A(a22a33a23a32)b1+(a13a32a12a33)b2+(a12a23a13a22)b3 y=A(a23a31a21a33)b1+(a11a33a13a31)b2+(a13a21a11a23)b3 z=A(a21a32a22a31)b1+(a12a31a11a32)b2+(a11a22a12a21)b3 If deltaA returns 0 , then this method should return null. Write a method, deltaA(double[II] arrayA), that returns a double value, using the formula. A=a11a21a31a12a22a32a13a23a33=a11a22a33+a31a12a23+a13a21a32a13a22a31a11a23a32a33a21a12 Write a main method that prompts the user to enter the coefficients: a11, a12, a13, a21, a22, a23, a31,a32,a33,b1,b2, and b3 and displays the result. The a11, a12, ...coefficients should be in a two dimensional array called arrayA. And, b1, b2, and b3 should be a single dimensional array, arrayB. The output should print the matrix, arrayA, and display arrayB. Then, it should display: For this system of components, x is ..., y is ..., and z is ... If the matrix solution is null, then display "No solution." Program Specification - Write a class named SolveMatrix that contains a main method. - There should be one .java file (i.e SolveMatrix.java) - Use a package named edu.ttc.egr281Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started