|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectmonthlyCalendar.Activity
public class Activity
This class represents an activity. An activity is associated with a name, start time, end time and duration. We have implemented this class for you and you should not modify it.
| Constructor Summary | |
|---|---|
Activity(java.lang.String name,
Time startTime,
int duration)
Initializes an Activity object based on the parameters. |
|
| Method Summary | |
|---|---|
int |
getDuration()
Returns the activity's duration (in minutes). |
Time |
getEndTime()
Returns the activity's end time. |
java.lang.String |
getName()
Returns the name of the activity. |
Time |
getStartTime()
Returns the activity's start time. |
void |
setDuration(int duration)
Updates the activity's duration. |
void |
setName(java.lang.String name)
Updates the activity's name. |
void |
setStartTime(Time startTime)
Updates the activity's start time. |
java.lang.String |
toString()
Returns a string representation for an Activity. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Activity(java.lang.String name,
Time startTime,
int duration)
name - name of the activitystartTime - time when activity beginsduration - duration of the activity in minutes| Method Detail |
|---|
public java.lang.String getName()
public void setName(java.lang.String name)
name - activity namepublic Time getStartTime()
public void setStartTime(Time startTime)
startTime - new start timepublic int getDuration()
public void setDuration(int duration)
duration - new duration (in minutes).public Time getEndTime()
public java.lang.String toString()
Activity Name: name, StartTime: startTime, EndTime: endTime, Duration: duration
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||