Hi I'm new around and I'm actually doing a java homework right now, it asks me to write an application that contains an enumeration that represents the days of week.
My first objective in the program is to display a list of the days,
Then I am suppose to prompt the user for a day,
And finally display the hours of the chosen day.
I'm not really sure what to do here since I am getting an error compiling this
Code:import java.util.Scanner;
public class DayOfWeek
{
enum Days {MON, TUE, WED, THU, FRI, SAT, SUN}
public static void main(String[] args)
{
String entry;
Scanner scan = new Scanner(System.in);
System.out.println("Enter a day: ");
entry = scan.nextLine();
switch(entry)
{
case MON:
System.out.println("Business hour from 9 to 9");
break;
case TUE:
System.out.println("Business hour from 9 to 9");
break;
case WED:
System.out.println("Business hour from 9 to 9");
break;
case THU:
System.out.println("Business hour from 9 to 9");
break;
case FRI:
System.out.println("Business hour from 9 to 9");
break;
case SAT:
System.out.println("Business hour from 9 to 6");
break;
case SUN:
System.out.println("Business hour from 11 to 5");
break;
default:
System.out.println("No such day exist!");
}
}
}

