Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that prints out a month in a calendar based on input by the user. The system will ask the user for the

image text in transcribedimage text in transcribed

Write a program that prints out a month in a calendar based on input by the user. The system will ask the user for the month, the day that the month starts (e.g., Sunday, Monday, Tuesday, etc). and how many days in the month (e.g., 29, 30, 31). You can assume that the user enters the correct day that the month starts on and the correct number of days. You will then print out the calendar with the first day of the month starting on the inputted day, and then all the corresponding days and dates for the month. You will use a 2-d array to store the day (1, 2, 3, 4, etc.) and then print out the array. You can do this program in the main method. See below for some sample output:

----1GRASP exec: java Lab5 Calendar Enter the month: February What day is the first of the month: Wednesday How many days in this month: 29 February Sun Mon Tue Wed Thu Fri Sat 3 10 17 2 4 2 16 23 18 25 15 12 19 26 13 20 27 14 21 28 29 jGRASP: operation complete

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions