|
School of Engineering and
Applied Science Department of Computer Science CSci 53 -- Introduction to Software Development http://www.seas.gwu.edu/~csci53/fall02 Prof. Michael B. Feldman mfeldman@seas.gwu.edu |
The goal of this project is to develop some
methods in a class, and to use them in an application program.
| All
these methods are public static;
none of them write any output to the console. boolean isValid (int aMonth, int aDay, int aYear) Returns true if aMonth, aDay, and aYear form a valid date whose
year is no earlier than 1753, and false
otherwise.
int daysInMonth (int aMonth, int aYear) Returns the number of days the
month aMonth has in the
year aYear, or Integer.MIN_VALUE if either
parameter is out of range.
int dayOfWeek(int aMonth, int aDay, int aYear) Returns the day of the week
(Sunday = 0, Monday = 1, etc.) for the given month/day/year combination,
if that combination forms a valid date, or Integer.MIN_VALUE otherwise.
String monthName (int aMonth) Returns the name of the given
month (1 = "January",
etc.), if aMonth is the
1-12 range, and the string "BAD
VALUE" otherwise.
String dayName (int aDayOfTheWeek) Returns the name of the given day
(0 = "Sunday", etc.) if aDay is in the 0-6 range, and
the string "BAD VALUE"
otherwise.
|
Your grade will be calculated on a 20-point basis, as follows: