|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSpeedDating
public class SpeedDating
A class to give students experience using loops. This class creates and manipulates objects of Greg's Date class.
Constructor Summary | |
---|---|
SpeedDating()
Create an empty SpeedDating object (this is known as a "default" constructor) |
Method Summary | |
---|---|
void |
beMyValentine(int startYear)
Prints the day of the week (e.g. |
Date |
discoverColumbusDay(int year)
Computes and returns the Date on which Columbus Day will fall in a given year. |
Date |
getHalfWayDate(Date start,
Date end)
Returns the date that lies midway between two dates. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpeedDating()
Method Detail |
---|
public void beMyValentine(int startYear)
startYear
- the first of the 10 consecutive yearspublic Date discoverColumbusDay(int year)
year
- the year for which to compute the date of Columbus Day
public Date getHalfWayDate(Date start, Date end)
start
- the earlier of the two datesend
- the later of the two dates
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |