Write a Java program that displays the class duration based…
Write a Java program that displays the class duration based on the day of the week. The program should ask the user to enter a number corresponding to the weekday (1 for Monday, 2 for Tuesday, 3 for Wednesday, etc.). Based on the input, the program should output the class duration as follows: a. If the input is 1, 3, or 5, print “50 minutes.”b. If the input is 2 or 4, print “75 minutes.”c. If the input is 6 or 7, print “No class.”d. For any other input, print “Wrong input.” Use switch statements to implement this logic.