Question: this is java. Create a public enum Weekday with constants for MONDAY, TUESDAY.... until SUNDAY. The enum should have an instance method boolean isWeekday()and an

this is java.
Create a public enum Weekday with constants for MONDAY, TUESDAY.... until SUNDAY. The enum should have an instance method boolean isWeekday()and an instance method boolean is Holiday() The isHoliday() method should return the opposite of isWeekday() Write a program which demonstrates how this enum could be used, which has a method testDay which takes a Weekday as the argument and prints a message depending on whether the Weekday is a holiday or not. o If holiday, print Stay home and play with your cat." o If weekday, print "Go to work." In the main method loop over all values in the Weekday enum and sends them as argument to the method
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
