Question: 2. USE LIST FOR THIS PROBLEM. Create a new class called AverageMyNumbers. The goal is to average the numbers that a user enters. Start by

 2. USE LIST FOR THIS PROBLEM. Create a new class called

2. USE LIST FOR THIS PROBLEM. Create a new class called AverageMyNumbers. The goal is to average the numbers that a user enters. Start by asking the user to enter the number of numbers they would like to average. Use a standard for-loop to obtain the users numbers (storing them into a List called the Numbers). Use a for-each loop to quickly sum all elements of the Numbers. Use the sum of the elements to find the average. Use an enhanced for loop to quickly print the list of numbers and output the average rounded to three decimal places. The final output should look something like the following: 34 28 98 77 21 17 Your Numbers: Your Average: 45.833 3. Create a new class called MyShoppingList. Create an ArrayList named shoppingList and then output a basic menu that looks like the following: 1. Add an item to your shopping list 2. Delete an item from your shopping list 3. Check to see if an item is on your shopping list 4. Check to see how many items are in your shopping list 5. Print your shopping list 6. Exit Then, . . Your program should loop as long as the user does not choose option in the menu (code this first) Option 1: User is asked to enter a new item. The item is added to the end of the list. Option 2: User is asked to enter item to delete and it should be deleted. If not found, communicate that. Option 3: User is asked what item to search for. They are then told whether or not it is in the list. Option 4: Return how many items are in the shopping list. Option 5: Uses an enhanced for-loop to print the list using nicely formatted output Option 6: The program exits (stops)

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 Databases Questions!