Write a method called gethilo that takes an stack of


Write a method called getHiLo() that takes an Stack of Integers of any length as its only parameter, and returns a new Stack of Integers that has a length of only 2. The top value in the new Stack that is returned is the highest value in the Stack that was passed, and the second value is the lowest value in the Stack that was passed. You can assume the Stack that is passed has at least one element in it, and you will leave it empty after the getHiLo() method is done.

You only have to write the method, not the entire class.

Solution Preview :

Prepared by a verified Expert
Business Management: Write a method called gethilo that takes an stack of
Reference No:- TGS01692787

Now Priced at $20 (50% Discount)

Recommended (95%)

Rated (4.7/5)