Create an application that does the following tasks: 1. The main part of the pro
ID: 3621979 • Letter: C
Question
Create an application that does the following tasks:
1. The main part of the program will coordinate the tasks in the application.
2. In a separate method, you will:
a. create an array that lists 10 types of food.
b. collect user input in a separate array that rates each food from 1 - 10
3. In a third method you will output each food and its rating.
4. You will collect the input in a loop.
5. Your program will not allow the user to proceed with rating the next food item until a valid number from 1 - 10 is entered. In other words, if the user enters the number 12 for a food item, your program will not progress to the next food item. It will ask the user to enter a valid number for that food item. Here is a sample of a possible data entry session, including what should happen if the user enters an incorrect number (the numbers in red are the user's input):
Please rate beans from 1 - 10: 6
Please rate spinach from 1 - 10: 12
Please rate spinach from 1 - 10: 13
Please rate spinach from 1 - 10: 9
Please rate apples from 1 - 10: 8
Please rate pears from 1 - 10: 7
And so on...
Note: You will collect the data for only one user. The third method will create output that is different than the example above. The output should like like this:
{users name} rated beans as 6
{users name} rated spinach as 9
{users name} rated apples as 8
{users name} rated pears as 7