Design a program using Java - Apache NetBeans. With the following enum class: public enum Day { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY } Create a second class called enumDayMood with a void method call telDayMood (). This method contain a switch case as follows: switch (day) {
Design a program using Java - Apache NetBeans. With the following
enum class:
public enum Day {
SUNDAY, MONDAY, TUESDAY, WEDNESDAY,
THURSDAY, FRIDAY, SATURDAY
}
Create a second class called enumDayMood with a void method call telDayMood ().
This method contain a switch case as follows:
switch (day) {
case MONDAY:
JOptionPane.showMessageDialog (frame, "Mondays are bad.");
break;
case FRIDAY:
JOptionPane.showMessageDialog (frame, "Fridays are better.");
break;
case SATURDAY: case SUNDAY:
JOptionPane.showMessageDialog (frame, "Weekends are best.");
break;
default:
JOptionPane.showMessageDialog (frame, “Midweek days are so-so.");
break;
}
Create a method that will ask the user to enter a day of a week and the program should tell the mood of the day. If the user enter a wrong value the program should exit with 0.
Important: Use Apache NetBeans to create this program and submit all screenshots of your program output and the java code
Step by step
Solved in 3 steps with 1 images