g through multi-dimensional arrays, functions, function overloading Instructions: 1) Write a SET OF 3 OVERLOADED functions called flipMatrixHorizontal() that takes the following inputs: a) a 2-dimensional array with any number of rows and 3, 4, or 5 columns (this is where the overloading comes in). b) an array to put the flipped array values in c) number of rows d) number of columns
Mirrored Matrices
Concepts Tested: iterating through multi-dimensional arrays, functions, function overloading
Instructions:
1) Write a SET OF 3 OVERLOADED functions called flipMatrixHorizontal() that takes the following inputs:
a) a 2-dimensional array with any number of rows and 3, 4, or 5 columns (this is where the overloading comes in).
b) an array to put the flipped array values in
c) number of rows
d) number of columns
The function should reverse the ROWS (rotate around the horizontal axis)of the original array and put the new values in the flipped array.
2) Write a SET OF 3 OVERLOADED functions called flipMatrixVertical() that takes the following inputs:
a) a 2-dimensional array with any number of rows and 3, 4, or 5 columns (this is where the overloading comes in).
b) an array to put the flipped array values in
c) number of rows
d) number of columns
The function should reverse the COLUMNS (rotate around the vertical axis)of the original array and put the new values in the flipped array.
3) You should have six functions when complete.
Example:
Original 3 x 3 matrix:
0 1 2
3 4 5
6 7 8
Flipped vertically:
2 1 0
5 4 3
8 7 6
Flipped horizontally:
6 7 8
3 4 5
0 1 2
code given:
** images show expected outcome **



Step by step
Solved in 2 steps









