Question: how do I make a program to to prompt user to enter a positive integer value. Protect the input and validate that input is a
how do I make a program to to prompt user to enter a positive integer value. Protect the input and validate that input is a positive number. Store each value, as it is entered, into an array list of type integer. Continue prompting for input until the user enters a negative number. For the resulting array list, determine the following using an appropriate type of iteration and algorithmic pattern:
- How many values greater than 15 were entered?
- How many values between 15 and 25 were entered?
- Where in the array list are the values between 15 and 25?
- What is the maximum value in the array list?
- Where are the maximum values? There may be more than one.
- What is the average of the values entered in first half versus the average of the values entered in the second half?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
