Given an array of distinct integers, write a method called elementRank() that replaces each array element by its rank. The minimum array element has the rank 1; the second minimum element has a rank of 2, etc. For example, calling the method on array {18, 15, 3, 19, 2, 41, 10} will change it to {5, 4, 2, 6, 1, 7, 3}. Make sure you output the array after calling the method.