[SOLVED] SOLVED:non-negative 3x3 Matrices

25.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (5 votes)

Construct the class of non-negative 3×3 Matrices containing non-negative double elements * with the following functionalities: A=[3][3] * 1. Determinant method returns the double value of the matrix determinant: det(A)= a[1][1] *(a[2][2]*a[3][3]-a[2][3]*a[3]2]) + a[1][2] *(a[2][3]*a[3][1]-a[2][1]*a[3][3]) + a[1][3] *(a[2][1]*a[3][2]-a[2][2]*a[3][1]) 2. isNull method returns true if the matrix is a Null Matrix (all the elements are 0). Otherwise, isNull method returns false. 3. isUMatrix method returns true if the matrix is a U Matrix.(all elements are 1) Otherwise the return value is false. 4. Multiplication results in a 3×3 matrix and takes a constant of double type as the only input parameter. The resulting matrix R is: R=d*A= d* each element 5. Addition method returns a 3×3 sum of two matrices (it takes the addend matrix as an input parameter). The resulting matrix R is: R = A + B = add each element (r[1][1]= a[1][1]+b[1][1]) 5.B Given matrix X and matrix Y. Write a program segment that instantiates matrix Z and sets its elements: Z=2*X+Y; Example Output: Matrix A: 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 Matrix A IsNull trueMatrix A IsU falseMatrix A Determinant 0.000000Updated Matrix A: 0.000000 0.000000 0.000000 0.000000 5.000000 0.000000 0.000000 0.000000 0.000000 Matrix A IsNull falseMatrix A IsU falseMatrix A Determinant 0.000000Updated Matrix A: 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 Matrix A IsNull falseMatrix A IsU trueMatrix A Determinant 0.000000Updated Matrix A: 1.000000 1.000000 1.000000 1.000000 5.000000 1.000000 1.000000 1.000000 5.000000 Matrix A IsNull falseMatrix A IsU falseMatrix A Determinant 16.000000Matrix X: 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 Set Matrix X to 4 * A: 4.000000 4.000000 4.000000 4.000000 20.000000 4.000000 4.000000 4.000000 20.000000 Matrix X IsNull falseMatrix X IsU falseMatrix X Determinant 1024.000000Set Matrix Y to A + X: 5.000000 5.000000 5.000000 5.000000 25.000000 5.000000 5.000000 5.000000 25.000000 Matrix Y IsNull falseMatrix Y IsU falseMatrix Y Determinant 2000.000000Set Matrix Z to 2*X + Y: 13.000000 13.000000 13.000000 13.000000 65.000000 13.000000 13.000000 13.000000 65.000000 Matrix Z IsNull falseMatrix Z IsU falseMatrix Z Determinant 35152.000000

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.