Question: What Day is it ? Given the String variable day, determine if the day of the week stored in day is a weekday, is a
What Day is it
Given the String variable day, determine if the day of the week stored in day is a weekday, is a weekend day, or an Invalid day.
When checking the value of day, make sure that your code takes into account letter case
If the value of day is Monday, Tuesday, Wednesday, Thursday, or Friday, then print to the console the day and is a weekday."
The output for Tuesday should look like this: "Tuesday is a weekday."
If the value of day is Saturday or Sunday, then print to the console the day and is a weekend day." The output for Saturday should look like this: "Saturday is a weekend day." Otherwise,print "Invalid day!". In Java
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
