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:
XXXXXXXXXX XXXXXXXXXX
Can't find 35
XXXXXXXXXX
Sample output of HighArray class once you do the above methods:
current array items: XXXXXXXXXX XXXXXXXXXX
Can't find 35
array items after delete some values: XXXXXXXXXX33
the Max is 88
the array after calling max method: XXXXXXXXXX33
the array after calling remove max method: XXXXXXXXXX
the new max is 77
the array after calling reverse method XXXXXXXXXX