// Prog: matrix_operations_template.cpp // Author: #include // define Matrix type ... // POST: returns A+B Matrix operator+ (const Matrix A, const Matrix B) { // ... } // POST: returns matrix product A*B Matrix operator* (const Matrix A, const Matrix B) { // ... } // POST: returns scalar multiplication s*A Matrix operator* (const double s, const Matrix A) { // ... } // POST: returns scalar multiplication A*s Matrix operator* (const Matrix A, const double s) { // ... } // PRE: a 2x2-matrix is in is according to the format: ... (specify your format) // POST: a 2x2-matrix is extracted from is std::istream& operator>> (std::istream& is, Matrix& A) { // ... } // POST: A is written to os according to the format: ... (specify your format) std::ostream& operator<< (std::ostream& os, const Matrix A) { // ... } int main () { // ... return 0; }