Question
How would I write lines of code in Java to print this out? You are required to implement a method DayOfWeek. You are required to
How would I write lines of code in Java to print this out?
You are required to implement a method DayOfWeek. You are required to use a switch statement in the method DayOfWeek. The method will accept as input an integer from 1 7. The method will return the day of the week as a String. The method DayOfWeek should not output any results. All it should do is return a String. Please include a while loop that allows the user to enter multiple inputs and then prompts the user with "Do you want to continue (y/n)? " Output from your completed program should look like this: Enter an integer number between 1 - 7, for day of week 2 The day of week you picked is Monday Do you want to continue y/n y Enter an integer number between 1 - 7, for day of week 7 The day of week you picked is Saturday Do you want to continue y/n y Enter an integer number between 1 - 7, for day of week 1 The day of week you picked is Sunday Do you want to continue y/n y Enter an integer number between 1 - 7, for day of week 66 The day of week you picked is Illegal weekday Do you want to continue y/n
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started