Question: Write a program that prompts the user for a number between 06 representing a day in the week where: 0 represents Sunday, 1 represents Monday.

 Write a program that prompts the user for a number between

Write a program that prompts the user for a number between 06 representing a day in the week where: 0 represents Sunday, 1 represents Monday. and 6 represents Saturday. If the user entered 1 (Monday) or 3 (Wednesday) the program should print: Our Java class meets on Monday and Wednesday We meet from 8:40 - 10:4 If the user entered 2 (Tuesday), 4 (Thursday), or 5 (Friday) the program should print: We do not have Java today, but we have other classes If the user entered 0 (Sunday) or 6 (Saturday) the program should print We have no classes today It is the weekend Otherwise display an error message say that the input is invalid THIS PROGRAM SHOULD BE WRITTEN IN 2 WAYS: 1. A swtich statement 2. Multi if (if, if else, else)

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!