program segment at the locations of // #### your code here ... to acquire the input from the user using a Scanner. Assuming there is no user input error and both methods, find_day() and out_weekday(), already exist and work correctly. So the following program is supposed to ask the user for the month as a string and the day of the month as an integer.
I need help completing the java program segment at the locations of
// #### your code here ...
to acquire the input from the user using a Scanner. Assuming there is no user input error and both methods, find_day() and out_weekday(), already exist and work correctly.
So the following program is supposed to ask the user for the month as a string and the day of the month as an integer.
import java.util.Scanner;
public class OutDays
{
public static void main(String[] args)
{
// #### your code here for ...
int year day, weekday;
String month;
String outday = "";
System.out.printf("Enter the month%n");
// #### your code here ...
System.out.printf("Enter the day%n");
// #### your code here ...
weekday = find_day(month, day);
outday = out_weekday(weekday);
System.out.printf("The day is: %s%n", outday);
}
}
Step by step
Solved in 2 steps