Question: Using Java (please include code and not a screenshot) /** getStartDay * The method getStartDay() implements Zeller's Algorithm for determining the * day of the

Using Java (please include code and not a screenshot)

Using Java (please include code and not a screenshot) /** getStartDay *

 /** getStartDay * The method getStartDay() implements Zeller's Algorithm for determining the * day of the week the first day of a month is. The method adjusts Zeller's * numbering scheme for day of week ( 0=Saturday, ..., 6=Friday ) to conform * to day of week number that corresponds to ISO conventions (i.e., * 1=Monday, ..., 7=Sunday) * * Pre-Conditions: The month value, m, is 1-12 The day value, d, is 1-31, or * 1-28, 1-29 for February The year value, y, is the full year (e.g., 2012) * * Post-Conditions: A value of 1-7 is returned, representing the first day of * the month 1 = Monday, ..., 7 = Sunday * * Reference: https://codereview.stackexchange.com/questions/67722/its-friday-zellers-congruence-revisited * * @param month * @param year * @return dayNum (1 = Mon, ... , 7 = Sun ) * * precondition: month, year, and day are integer types * * @author: rolfl, modified by Josh Lafond */ public static int getStartDay(int month, int year) { // Adjust month number & year to fit Zeller's numbering system if (month   1. Write a program that prompts the user to enter a month (1-12) and a year (e.g., 2012), and then displays a calendar for that month and year as illustrated below: January 2012 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 30 31 Your program must use the following methods: Method Description void printMonth Calendar(int month, int Displays a calendar like the one year) above for a specified month and year. void print Month Header(int month, int Displays the header information year) (month, year, line separator, 3- character day names for a calendar. void printMonthBody(int month, int Displays the days in the calendar year) associated with the corresponding days of the week. String getMonthName(int month) Returns the name of the month for a specified month number (e.g., returns March for m=3). int getStartDay(int month, int year) Returns the day of week number (1=Monday,..., 7= Sunday) for the specified month and year. int getNumDaysInMonth(int month, int Returns the number of days in year) specified month and year. Leap years are accounted for. boolean isLearYear(int year) Returns true if the specified year is a leap year, and returns false otherwise. 2. Write a program that prompts the user to specify a year (e.g., 2012) and then displays a calendar for each month in that year. You must reuse the methods from part one

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!