Question: The following question is based on Java programming language. Make sure that the program is runnable using java program . Write a java program that

The following question is based on Java programming language. Make sure that the program is runnable using java program.

Write a java program that displays the calendar for a given month of the year. The program prompts the user to enter the year and the month, then displays the entire calendar for the month, as shown in the following sample run:

The following question is based on Java programming language. Make sure that

the program is runnable using java program. Write a java program that

displays the calendar for a given month of the year. The program

prompts the user to enter the year and the month, then displays

the entire calendar for the month, as shown in the following sample

run: Note: To get the total number of days, you need to

know whether the year is a leap year the and number of

days in each month. For example: January, March, May, July, August, October,

Note: To get the total number of days, you need to know whether the year is a leap year the and number of days in each month.

For example:

January, March, May, July, August, October, and December have 31 days.

April, June, September, and November have 30 days.

February has 28 days during a regular year and 29 days during a leap year. A regular

year, therefore, has 365 days, a leap year 366 days.

Ei4. Command Prompt C: \OOP \Assignment>java PrintCalendar Enter full year (e.g., 2022): 2022 Enter month as a number between 1 and 12: 1 January 2022 Sun Mon Tue wed Thu Fri Sat 2916233031017243141118255121926613202771421288152229 C: \OOP SAssignment>. Ci4. Command Prompt c: Command Prompt C: \OOP \Assignment>java PrintCalendar Enter full year (e.g., 2022): 2022 Enter month as a number between 1 and 12: 3 March 2022 Sun Mon Tue Wed Thu Fri Sat 613202771421281152229216233031024314112551226 C: \OOP\Assignment> cis. Command Prompt Gis. Command Prompt Ei4. Command Prompt c: Command Prompt C: \OOP\Assignment>java PrintCalendar Enter full year (e.g., 2022): 2024 Enter month as a number between 1 and 12: 2 February 2024 Sun Mon Tue Wed Thu Fri Sat 4111825512192661320277142128815222991623101724 C: \OOP\Assignment>

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!