Question: provide program called FindSmallest to create a 1D array with 10 integer variables. The value of each integer variable in the 1D array is a

provide program called FindSmallest to create a 1D array with 10 integer variables. The value of each integer variable in the 1D array is a random number between 1 and 100. After the 1D array is initialised, write a method to find the smallest number among the 10 integers in the 1D array. The output of the program should firstly display all integers in the 1D array, and then indicate the smallest integer among them as well as the index of the smallest integer in the 1D array. 

Screenshot 2022-05-17 005153.png

2. code program called FindBiggest to create an ArrayList with n integer variables. The program will continually ask the user to input the integer number until the user's input is "0" (zero). After the ArrayList is initialised, write a method to find the biggest number among the entered integers. The output of the program should firstly display all integers, and then indicate the biggest integer among them as well as the index of the biggest integer in the ArrayList. 

Screenshot 2022-05-17 011251.png


3. program code called ShoppingList. The program will continuously ask the user to input the name of items on a shopping list (one item each time) until the user's input is "None". The program will store the user's items in an instance of ArrayList. Once the user completes the inputting, the program will output all items on the shopping list (one item each line, and "None" should not be printed). 

Screenshot 2022-05-17 011642.png 

62, 54, 3, 45, 25, 96, 95, 78, 50, 13, The smallest one is: 3, and the index is: 2

Step by Step Solution

3.43 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Below are the Java programs for the provided scenarios 1 FindSmallest Program import javautilArrays ... View full answer

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!