Embed presentation
Download to read offline


![enum Level {
LOW,
MEDIUM,
HIGH
}
public class Main {
public static void main(String[] args) {
Level myVar = Level.MEDIUM;
switch(myVar) {
case LOW:
System.out.println("Low level");
break;
case MEDIUM:
System.out.println("Medium level");
break;
case HIGH:
System.out.println("High level");
break;
}
}
}](https://image.slidesharecdn.com/enuminaswitchstatement-240910234500-3f3f181f/75/Enum-in-a-Switch-Statement-learning-material-pptx-3-2048.jpg)

The document provides guidelines for creating a Java program utilizing an enum in a switch statement, with defined levels: low, medium, and high. It includes an example of a switch statement that reacts to the enum value and prints corresponding messages. Additionally, it outlines a rubric for grading based on execution success and the number of mistakes made by the student.


![enum Level {
LOW,
MEDIUM,
HIGH
}
public class Main {
public static void main(String[] args) {
Level myVar = Level.MEDIUM;
switch(myVar) {
case LOW:
System.out.println("Low level");
break;
case MEDIUM:
System.out.println("Medium level");
break;
case HIGH:
System.out.println("High level");
break;
}
}
}](https://image.slidesharecdn.com/enuminaswitchstatement-240910234500-3f3f181f/75/Enum-in-a-Switch-Statement-learning-material-pptx-3-2048.jpg)
