Question: Create an app to allow the user to enter a set of values ( a value could be a positive or negative number ) and

Create an app to allow the user to enter a set of values (a value could be a positive or negative
number) and store the values into an array. The app will then display the largest value among the
values after the user enters -1(the sentinel value).
Write a program that accepts a list of numerical values entered by the user and the app will use a recursive
method named maxElement() to display the maximum (or largest) value.
Assume that the number of values entered is at most 40.
The maxElement method, which returns the largest value in an array that is passed as an argument to the
method and the method should use recursion to find the largest element. Feel free to use ArrayList type
to store the numbers if you want to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!