Question
IN THE FOLLUWING CODE IN JAVA CREATE A GUI TO DISPLAY THIS IMAGE AS RESULT PLEASE Create the following GUI in this code in java.
IN THE FOLLUWING CODE IN JAVA CREATE A GUI TO DISPLAY THIS IMAGE AS RESULTPLEASE Create the following GUI in this code in java. You do not have to provide any functionality.
package pupr.edu.DayOfWeek;
// Java program to find Find the Day
// for a Date
import java.util.*;
class DayOfWeek
{
// Print Day for a Date
static void Zellercongruence(int day, int month,int year)
{
if (month == 1)
{
month = 13;
year--;
}
if (month == 2)
{
month = 14;
year--;
}
int q = day;
int m = month;
int k = year % 100;
int j = year / 100;
int h = q + 13*(m + 1) / 5 + k + k / 4 + j / 4 + 5 * j;
h = h % 7;
switch (h)
{
case 0 : System.out.println("The day of the week is Saturday"); break;
case 1 : System.out.println("The day of the week is Sunday"); break;
case 2 : System.out.println("The day of the week is Monday"); break;
case 3 : System.out.println("The day of the week is Tuesday"); break;
case 4 : System.out.println("The day of the week is Wednesday"); break;
case 5 : System.out.println("The day of the week is Thursday"); break;
case 6 : System.out.println("The day of the week is Friday"); break;
}
}
// Driver code
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
System.out.print("Enter month(1-12)\t:");
int month=sc.nextInt();
System.out.print("Enter day(1-31)\t\t:");
int date=sc.nextInt();
System.out.print("Enter year\t\t:");
int year=sc.nextInt();
Zellercongruence(date, month, year); //date (dd/mm/yyyy)
sc.close();
}
}
Day of Week Month: August Day: 7Year: 2002 Day of Week The day of the week is WednesdayStep 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