Assignment 19th September Homework

By Eleanor Ray,2014-11-12 23:58
7 views 0
Assignment 19th September Homework

Question :-

    For this assignment you have to perform Matrix operations (Addition, Subtraction,

    Multiplication, Determinant, Transpose and Inverse). For each of the above mentioned

    operation you have to make a function in addition to two other functions for ‘Inputting’ and

    ‘Displaying’ the Matrices in Row-Order Format. (In total there will be 8 functions :- 6 for the operations and 2 functions for inputting and displaying the data.)

    ; For Addition, Subtraction, Multiplication, Transpose it can be 2D array of any size(say

    Max dimension for both row and Column be 10). So, to prevent users from having to

    entering 100 (for a 10X10 matrix) elements every time (even for a smaller matrix), you

    should ask for the number of rows and columns in the matrix before the user would

    input the values of the matrix elements. Basically your code should be generic. The

    point is user should be free to enter 2X3, or 4X2 , or 9X9 Matrix. If the operation is not

    supported (ex. adding two arrays of different dimensions) just print out that the

    operation is not supported and return to the menu.

    ; For Determinant and Inverse operation we are giving you the relaxation to choose fixed

    matrix size of 3X3. (3 rows and 3 column). You do not need to calculate the determinate

    and inverse operations for any matrix that is not 3x3 (the function can just check to see

    if the matrix not 3x3. If it is, just print out that the operation is not supported).

    ; You have to write the above code using both Matrices and Vectors. Submit two .cpp files

    one using Matrices and one using Vectors. If anyone submits only one of the .cpp file

    half points will be given.

    Requirements :-

    In the main function you should have a menu in which you will ask the user his or her choice for which of the operations he or she wants to perform. For Ex.

    Cout<<”\n Menu “;

    Cout<<”\n Choice 1”;

    Cout<<”\n Choice 2”;

    Cout<<”\n Choice 3”;





    Cout<<”\n Choice n”;

    Cout<<”\n Enter your Choice”;


    After taking the choice value, one should have a switch network to choose which function (for the matrix operation) needs to be called.

    Extra Credit :- Extra points will be given to people who program in such a manner that after completion of one operation, it should display the menu again and ask user his choice whether he wants to quit or he want to perform another operation.

Points we will be grading this assignment :-

    1) We want to check whether you understand call by reference and call by value and you

    are using in right perspective.

    2) Are you taking full use of the functions.

    3) You are not doing the same mistakes that’s mentioned in guidelines and some other you

    know. (If anyone has other techniques to optimize the code feel free to share with

    everyone by putting it in chat)

    4) How correctly you are passing data between the function

Thanks and best of luck for assignment

Report this document

For any questions or suggestions please email