Question: (Find future dates) Write a program that prompts the user to enter an integer for today's day of the week (Sunday is 0, Monday is

 (Find future dates) Write a program that prompts the user to

(Find future dates) Write a program that prompts the user to enter an integer for today's day of the week (Sunday is 0, Monday is 1, ... and Saturday is 6). Also prompt the user to enter the number of days after today for a future day and display the future day of the week. Here is a simple run: O for Sunday 1 for Monday 2 for Tuesday 3 for Wednesday 4 for Thursday 5 for Friday 6 for Saturday Enter today's day: 1 (enter) Enter the number of days elapsed since today: 3 (enter) Today is Monday and the future day is Thursday The assignment guideline: import the Scanner class from java.util package create the class called FutureDates create main method inside the main method block declare String datatype aDay and assign as empty string create Scanner object prompt for the user to choose today's day take the user input with nextInt() method and assign the value to today variable with int datatype use if-else statement to determine the value for a Day prompt for the user to type the number of days started from today's day take the user input with nextInt() method and assign the value to futureDay variable with int datatype calculate the future day and using the switch statement with case 0 to case 6 and default and then print out the today's day and future day

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a Java program based on the guidelines provided java import javautilScanner public class FutureDates public static void mainString args Declare ... View full answer

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!