public class CourseSchedule
extends java.lang.Object
Constructor and Description |
---|
CourseSchedule(int firstHH,
int firstMM,
int length,
int gap,
int numberPerDay)
Construct a CourseSchedule.
|
Modifier and Type | Method and Description |
---|---|
int |
getFirstHour()
Get the hour of the first scheduled course.
|
int |
getFirstMinute()
Get the minute of the first scheduled course.
|
int |
getGap()
Get the number of minutes between the end of one course and the
start of the next.
|
int |
getLength()
Get the length of a course (in minutes).
|
int |
getNumberPerDay()
Get the number of courses per day.
|
static boolean |
invalidTime(int hh,
int mm)
Check the validity of a time (in miilitary format).
|
public CourseSchedule(int firstHH, int firstMM, int length, int gap, int numberPerDay)
firstHH
- The hour of the first coure of the day (military format)firstMM
- The minute of the first course of the daylength
- The length of a course in minutesgap
- The amount of time between courses in minutesnumberPerDay
- The number of coure periods per dayjava.lang.IllegalArgumentException
- if the parameters are invalidpublic int getFirstHour()
public int getFirstMinute()
public int getGap()
public int getLength()
public int getNumberPerDay()
public static boolean invalidTime(int hh, int mm)
hh
- The hours (in military format)mm
- The minutes