mkdir ~/cs171/hw1 cp /home/cs171000/Handouts/hw1/*.java ~/cs171/hw1 
public static int findDayInDigit( int month, int day, int year ) 
that receives as inputs a date that is after Jan 1, 2000 encoded using the parameter variables:

and returns the output value:


1. compute n = the number of days between the input date and 1/1/2000 a. first: add the number of days between input year and year 2000 b. then: add the number of days between input month and January of the input year c. finally: add the number of days between input day and the first day of the month. 2. n = n + 6 (because 1/1/2000 is a Saturday, and 6 represents Saturday) 3. return: n%7 
Examples:


This is how you can tell if a year is leap:


Complete the findDayInDigit( int month, int day, int year ) method in the skeletal program file.
How to run the program:

Sample outputs:
>> java hw1 1/1/2000 1/1/2000 is a Saturday >> java hw1 1/2/2000 1/2/2000 is a Sunday >> java hw1 8/1/2013 8/1/2013 is a Thursday >> java hw1 1/1/3000 1/1/3000 is a Wednesday 
There is also the command cal on UNIX that shows the calendar of any year. For example:
>> cal 2000 >> cal 2010 
Use the following command (from inside your cs171/hw1 project directory) to turn in your program:
cd ~/cs171/hw1 /home/cs171000/turnin hw1.java hw1 
Note:

mkdir ~/cs171/hw1 
(If you want to do this from your laptop, you must read this webpage first:


You can do so by logging in on a computer in the MathCS lab
Or, you can log in from your laptop (with Internet connection) remotely using the Putty program.
See this webpage on how to work from your dorm:
