Question: SUBMIT DayGrid.java Additional Iverson requirements for Bellevue College CS210, SPRING 2018: Crucial Note: I know, and you soon will know, that assigning something straight from

SUBMIT DayGrid.java

SUBMIT DayGrid.java Additional Iverson requirements for Bellevue College CS210, SPRING 2018: Crucial

Additional Iverson requirements for Bellevue College CS210, SPRING 2018:

Crucial Note: I know, and you soon will know, that assigning something straight from this text will create a massive hunt for the solution posted someplace on the internet. Such work does not help anyone learn to program!!!

Therefore: Listed below are specific Iverson modifications that make this assignment unique. Go ahead, find what examples you can on the internet. LEARN from those examples, then close that window, and write your own code!!!

DO NOT use the padded helper provided, chapter 4 has better tools, like printf if needed.

MUST write a method showGrid(month, year) that produces output, see example below.

int month is a parameter, must be 1-12 for the twelve months of the year

int year is a year of the Gregorian calendar (additional detail below)

MUST use a method daysInMonth, Exercise #4, page 309, Chapter 4.

showGrid works for any month (1-12), and any year (1900-2100) including leap years.

Program Submission Requirements

Write your own code!!! All submissions will be processed with JPlag: jplag.ipd.kit.edu (Links to an external site.)Links to an external site.

In text project, we're given the first Sunday, but the Iverson requirements indicate that we do not provide this. How do we get the first Sunday of a month????

My answer: use the Oracle GregorianCalendar:

https://docs.oracle.com/javase/8/docs/api/index.html?java/util/GregorianCalendar.html (Links to an external site.)Links to an external site.

Here's another example from my code:

Note: I know, and you soon will know, that assigning something straight

Notes of interest:

The Oracle default for counting months is the standard zero based counting, just like 0,1 in binary, and just like the 0,1,2,3.... we do for character counting in a String, yes!!! So for October that we often consider month 10, you need to use month-1,

For day of the week, Oracle breaks the standard, and calls Sunday 1, Monday is 2, Tuesday 3, etc.... I think that's because some calendars conside Sunday the 7th day, maybe?

Programming Projects 195 Sun Mon Tue Wed Thu Fri Sat 2 4 10 12 6 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | | 27 28 29 30 31 | One tricky part of this program is making the various columns line up properly with proper widths. We will learn better ways of formatting output in the next chapter. For now, you may copy the following helper method into your program and call it to turn a number into a left-padded string of a given exact width. For example, the call Programming Projects 195 Sun Mon Tue Wed Thu Fri Sat 2 4 10 12 6 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | | 27 28 29 30 31 | One tricky part of this program is making the various columns line up properly with proper widths. We will learn better ways of formatting output in the next chapter. For now, you may copy the following helper method into your program and call it to turn a number into a left-padded string of a given exact width. For example, the call

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!