Question: Write a method that returns a message based on the day of the week and the nature of the weather. If the day of the

 Write a method that returns a message based on the day

Write a method that returns a message based on the day of the week and the nature of the weather. If the day of the week is Monday, Tuesday or Wednesday and regardless of the weather, then the message is "It is early in the week, have an early night" If the day of the week is Thursday or Friday and the weather is good, then the message is "Go grab a coffee", else the message is "Go shopping" If the day of the week is Saturday or Sunday and the weather is good, then the message is "Go on a picnic", else the message is "Do some work around the house" whatToDo("Tuesday", true) rightarrow It is early in the week, have an early night whatToDo("Thursday", false) rightarrow Go Shopping whatToDo("Saturday", true) rightarrow Go on a picnic whatToDo("Sunday", false) rightarrow Do some work around the house For example: Test String dayofWeek = "Friday": boolean goodWeather = true: System.out.println("What will I do: " + whatToDo(dayOfWeek, goodWeather)): Result What will I do: Go grab a coffee

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!