Question: Please help! Write a program that prints the calendar for a given year or a given month. The user will be given the option of

Please help!

Write a program that prints the calendar for a given year or a given month. The user will be given the option of printing the calendar for the whole year or just a month. If the calendar for the whole year is being printed then the data for thanksgiving must be specified. You are required to create multiple methods. Also you need to consider if the year is a leap year or not.

Sample Output: output.txtPlease help! Write a program that prints the calendar for a given

Shell: PrintCalendar.javayear or a given month. The user will be given the option

How to proceed to solving this problem:

You need to find out how many days has passed since Jan 1800 up to the given year. You must check if the year is a leap year or not to know the number of the days in February.

You need to find out the first day of the month for each given month which is going to be Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.

You need to find out the Thanksgiving Day for the given year.

Now you are ready to print the calendar.

Refer to the provided shell for more details.

Requirements:

Must implement all the provided methods in the shell

Your program must work for a leap year as well

Your program must output a description indicating what the program does

Naming conventions

Indentation

Proper way of calling methods

Use of conditional statements

You are allowed to be creative by adding more functionality to your program

You can deviate from the provided shell and create your own solution. However you must use ample number of methods.

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!