Question: in java Programming Exercise 3.21 (Science: day of the week) Chapter 3, Problem 11PE Zeller's congruence is an algorithm developed by Christian Zeller to calculate

in java
Programming Exercise 3.21 (Science: day of the week) Chapter 3, Problem 11PE Zeller's congruence is an algorithm developed by Christian Zeller to calculate the day of the weus The formula is: ava, util.s public class Month hs(q+26(m+ 1)/10 + k + kf4 +V4 + 5j) 96 7 h is the day of the week (0: Saturday, 1: Sunday, 2: Monday, 3: Tuesday, 4: Wednesday, 5: Thursday, 6: Friday). q is the day of the month m is the month (3: March, 4: April, ..., 12: December). January and February are counted as months 13 and 14 of the previous public static //ereate obje scanner input //Getting system. out.pri int month :: int days 0 //Getting year System. out.pri //einding the 0) 11 (year 400 k is the year of the century(i.e..year%100). Note that the division in the formula performs an integer division Write a program that prompts the user to enter a year, month, and day of the month, and displays the name of the day of the SAMPLE RUN 1 hont switch (month) case 1: days case 2: if (isLe case 3:days- case 4:days # case 5: days 3 case 6: days3 case 7: days3 case 8:days # 3 case 9: days # 3 case 10:days case 11:days case 12 : days default: Enter year: (e.g., 2812): 2015 Enter month: 1-12: 1 Enter the day of the month: 1-31: 25 Day of the week is Sunday Foxit SAMPLE RUN 2: Enter year: (e.g., 2012): 2012 Enter the day of the month: 1-31: 12 SAMPLE RUN 3 //Displ ay output ar: (e.g., 2 Enter
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
