Course: Introduction to Computers & Programming (JAVA), Summer 2009
Instructor: Christopher Conway

Homework #2

Due: Tuesday, 2 June 2009 at 11:59 PM

Using the NYU calendar posted at http://www.nyu.edu/registrar/calendars/university-calendar.html, your program will be able to tell a student whether she has the day off for any given day during the year 2009. (Note that the calendar year 2009 spans the academic years 2008-2009 and 2009-2010.) These are the NYU Holidays that you should account for during the year 2009:

Here is how it should work:

  1. The student should be prompted to enter an integer for the month and then prompted to enter an integer for the day. (For example, entering "2" for the month and "14" for the day would represent February 14th.)
  2. The program will tell the student if that date is a vacation day and if so, which one, by printing out a message such as:
    February 16 is Presidents' Day.
  3. If the day selected is not a holiday, the program should print out a message such as:
    February 17 is not a school holiday at NYU.
  4. If the day selected is not a valid date, the program should print out a message such as:
    February 31 is not a valid date.
    or
    There is no 13th month, as far as I know.

Hints:

Style counts:

Your assignment should be submitted BY EMAIL to our class grader: Andrew Lott, adl316 (AT) nyu (DOT) edu.

Last modified: 02 Jun 2009