Question: In JAVA. Please use the code that is already in the program. CHALLENGE ACTIVITY 7.11.1: Enumerations: Grocery items. Print either Fruit or Drink (followed by

In JAVA. Please use the code that is already in the program.

In JAVA. Please use the code that is already in the program.

CHALLENGE ACTIVITY 7.11.1: Enumerations: Grocery items. Print either "Fruit" or "Drink" (followed by a newline) depending on the value of userltem. For example, if userltem is GR_APPLES, output should be: Fruit 1 import java.util.Scanner; 1 test passed public class Grocery Sorter { public enum Grocery Item {GR_APPLES, GR_BANANAS, GR_JUICE, GR_WATER}; HNMOOS public static void main(String [] args) { Grocery Item userItem; All tests passed userItem = Grocery Item. GR_APPLES; /* Your solution goes here */ 14 }

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!