public class SpeedDating
extends java.lang.Object
Constructor and Description |
---|
SpeedDating()
Create a SpeedDating object
|
Modifier and Type | Method and Description |
---|---|
void |
auldLangSynch(int theYear)
Computes and prints the day of the week on which New Year's Day will
fall for 10 consecutive years
|
Date |
getHalfwayDate(Date startDate,
Date endDate)
Computes and returns the Date that occurs "half way" between two Dates.
|
Date |
pollDancer(int year)
Computes and returns the Date on which Election Day will fall
in the USA for a given year
NOTE: By law, Election Day is the first Tuesday after the first
Monday in November
|
public void auldLangSynch(int theYear)
theYear
- the first of the 10 consecutive yearspublic Date pollDancer(int year)
year
- the year for which to compute the date of Election Day