Question: Code it in Java please The following are the steps that you should follow: (1) Create an array of String objects and populate it with

Code it in Java please
The following are the steps that you should follow: (1) Create an array of String objects and populate it with the the following colors: (Red, Purple, Orange, Yellow, Green) (2) Create an array parallelto the one created in (1) to store the Fruit or Vegetable that goes along with the colors (i.e., Apple for Red, Eggplant for Purple, etc.). However, you do not have this information, so you will need to write a loop that prompts the user to enter a Fruit or Vegetable that goes with that color. This prompt should include the color for which you are asking for the information (e.g., "What Fruit or Vegetable goes with this color?") (3) Create another parallel array that stores the number of fruit or vegetables wanted. You will also need to collect this information from the user. This time, your prompt should include the name of the color or fruit/vegetable for which you are asking for the number. (4) Print out each array item on it's own line such as follows / Color Fruit or Vegetable Number Wanted /I Red Purple Orange Yellow Green Apple Eggplant Orange Banana Lime 10 20 NOTE 1) Remember when to use print vs printn 2) Remember when to use Tab and how to use Tab in your print statement 3) Your program must use the Array name to output the Array values and not just hardcode the values. (i.e. color[index] instead of just putting "Purple" in your print statements)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
