Please use Java
To the HighArray class in the highArray.java program (Listing 2.3), add 2 of the following methods:
1. getMax() that returns the value of the highest key (value) in the array without removing it from the array, or –1 if the array is empty.
2. removeMax() that removes the item with the highest key from the array.
3. reverse() method for the HighArray class to reverse the order of elements of the array.
Add some code in main() to exercise these methods.
Note: you can download the HighArray class code from the blackboard.
Sample output of Current HighArray class:
77 99 44 55 22 88 11 0 66 33
Can't find 35
77 44 22 88 11 66 33
Sample output of HighArray class once you do the above methods:
current array items: 77 99 44 55 22 88 11 0 66 33
Can't find 35
array items after delete some values: 77 44 22 88 11 66 33
the Max is 88
the array after calling max method: 77 44 22 88 11 66 33
the array after calling remove max method: 77 44 22 11 66 33
the new max is 77
the array after calling reverse method 33 66 11 22 44 77