Question: It is required to design and implement an extension to the calculator created in the first milestone to support more functionalities to be done on

 It is required to design and implement an extension to thecalculator created in the first milestone to support more functionalities to bedone on matrices. Operations that will be supported in this second milestone

It is required to design and implement an extension to the calculator created in the first milestone to support more functionalities to be done on matrices. Operations that will be supported in this second milestone are: 1- Matrix Transpose 2- Matrix Inverse 3- Matrix Determinant The matrix should be entered by the user in the following format: [1 2 5,-18 14.2, 7.01 - 18 99.3] which is the format equivalent to a 3x3 matrix as shown: 1 -1 2 5 8 14.2 - 18 99.3] 17.01 Input Format The matrix should be entered by the user in the following format: [1 2 5, -18 14.2, 7.01 - 18 99.3] which is the format equivalent to a 3x3 matrix as shown: 1 -1 17.01 2 5 8 14.2 -18 99.3 User can choose between the different operations as follows: In case of Transpose: user types one matrix only then enters capital 'T' letter as shown: [1 2 4, 9 3 7] [1 9, 2 3, 4 7] In case of Inverse: user types one matrix only then enters capital 'l' letter as in the case of transpose. In case of Determinant: user types one matrix only then enters capital 'D' letter, and the ouput should be shown as a number. Constraints User will input string as shown previously: Example for a 3x4 matrix, it should be witten as follows [-0.125,-18 14.2, 7.01 -18 99.3, 15.0-99.24 18] User will input the matrix of size nxm; where 0 Inportant Note If the user enters a matrix in an incorrect format (other than the stated input format) your program must detect that and output the word "ERROR!" (MUST BE WRITTEN AS SHOWN, don't forget the exclamation mark, and note that all letters are capitals) For Example: [1 2 4, 47, 8] [-5 3 5, 7 6 1] ERROR! Your program should validate the mathematical conditions to do the different operations, for example: In the determinant, you should check if the matrix given can have a determinant or not. If not, you should output "ERROR!" to the user. Also, in the inverse case, you should detect the validity of the inversion. If no validity, your program should output an "ERROR!" Output Format The output should be a matrix of the result printed on a new line as shown previously. In case of the determinant, the ouput should be the value of the determinant of the matrix only. Also, the error message should be in the following format: "ERROR!" on a new line as shown in the examples above. NOTE: In the case of decimal point outputm you should set the precision of the output to 2 decimal point places Sample Input 0 [59-8-9-1,-21782] T Sample Output 0 [5-2,91,-87,-98,-1 2] Sample Input 1 [1 2 3,670,0 121 I Sample Output 1 [1.75 -0.12 -2.62,-1.5 0.25 2.25, 0.75 -0.12 -0.62] NOTE: don't use class or OOP

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!