"Out of order" means that the value of an element is greater than the value of the next (higher-subscript) element of the array. Do NOT sort the array or swap any elements.
To compute the median, you must first sort the array.
(Do not assume that the SORT button has been clicked.
However, you may re-use any methods in your code.)
Then, if the number of elements in the array is ODD, simply use the value in the middle;
if there is an EVEN number of elements, then take the two values in the middle and use their mean average.
The "mode" is the most common value (if any).
One way to find the mode is to first sort the array, then look for duplicates
(consecutive elements with the same value).
If you find two or more elements with the same value,
count how many of them there are and save the value that appears the most often.
If no value appears more than once, then there is no "mode". If that happens, say so. (But don't not bother checking to see if the set is "bimodal" or "multi-modal".)