Question: Note: this is java CHALLENGE ACTIVITY4.12.1: Enumerations: Grocery items Print either Fruit'or Drink (followed by a newline) depending on the value of userltem. For example,

Note: this is javaNote: this is java CHALLENGE ACTIVITY4.12.1: Enumerations: Grocery items Print either Fruit'or

CHALLENGE ACTIVITY4.12.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 3 public class GrocerySorter f 4 public enum GroceryItem (GR_APPLES, GR_BANANAS, GR_JUICE, GR_WATER; 6 7 public static void main (String [1 args) f GroceryItem userItem; All tests passed userItem Groceryltem . GR-APPLES; = 10 Your solution goes here 12 13 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!