views:

107

answers:

2

Create a class MAT of size m x n. Define the following matrix operations for MAT type objects

a. Addition b. Subtraction c. Multiplication.

A: 

You can read this article on the subject.

klausbyskov
If I were a CS-101 professor and one of my students handed that in, I would fail them for plagerism.
BlueRaja - Danny Pflughoeft
I don't think Klaus is suggesting that he/she simply submits the code-samples therein, but instead *reading* the material and adapting, or basing his/her own submission.It's certainly no closer worse than trying to get a code-sample from SO and submitting that.
David Thomas
@ricebowl: You are completely right.
klausbyskov
A: 

You can simply implement the matrix as a class with array of arrays for the values. Addition and Substraction as well as Multiplication will be easily implemented according to the definition.

Gabriel Ščerbák