Question
Work programming exercise 13.4, page 529, Display Calendar. Please follow the specifications given in the problem statement. You do not need to use the command
Work programming exercise 13.4, page 529, Display Calendar. Please follow the specifications given in the problem statement. You do not need to use the command prompt when running the program. Have your test program ask the user to enter for the month and year values. Notice the first three lines of the out are just strings. After that, it is a matter for extracting the day value and displaying it as shown using tabs and new lines. Notice every 7 values you need to move to a new line.
13.4 (Display calendars) Rewrite the PrintCalendar class in Listing 6.12 to display a calendar for a specified month using the Calendar and GregorianCalendar classes. Your program receives the month and year from the command line. For example: java Exercise13_04 5 2016 This displays the calendar shown in Figure 13.9
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
29 30 31
FIGURE 13.9 The program displays a calendar for May 2016. You also can run the program without the year. In this case, the year is the current year. If you run the program without specifying a month and a year, the month is the current month.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started