|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectscheduler.generate.ScheduleItem
public class ScheduleItem
Represents a single, scheduled course. Contains information regarding: which course it represents; which instructor teaches the course, and its section; where the course will be held; what day(s) the course will be held; what time the course will start/end.
Field Summary | |
---|---|
Course |
c
The course for this scheduled item |
Week |
days
The days in the week this item is scheduled |
Time |
end
The time at which this scheduled item ends |
Instructor |
i
The instructor for this scheduled item |
Location |
l
The location for this scheduled item |
int |
section
Course section (will someday be removed) |
Time |
start
The time at which this scheduled item starts |
Constructor Summary | |
---|---|
ScheduleItem(Instructor i,
Course c,
Location l,
int section,
Week days,
Time s,
Time e)
Creates a scheduled course, complete with instructor, location section, days taught, and start/end time. |
Method Summary | |
---|---|
boolean |
equals(ScheduleItem s)
Compares to ScheduleItem's. |
java.lang.String |
toString()
Displays all this object's fields in a visually easy-to-read form. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Instructor i
public Course c
public Location l
public int section
public Week days
public Time start
public Time end
Constructor Detail |
---|
public ScheduleItem(Instructor i, Course c, Location l, int section, Week days, Time s, Time e)
i
- Instructor teaching the coursec
- Course being taughtl
- Location course will be taughtdays
- Days of the week this course will be taughtstart
- Time the course startsend
- Time the course ends
// **Pre and Post Conditions** // Pre: //None of the parameters may be 0 or null i != null && c != null && l != null && section > 0 && days != null && start != null && end != null && //Start time cannot be after end time start < end && //Must be assigned to at least one days days.numOf > 0 NOTE: All of these preconditions are assumed "by-contract". So, there is no explicit check for them. Post: //All fields in object must equal those passed in this.i.equals(i) && this.c.equals(c) && this.l.equals(l) && this.section == section && this.days.equals(days) && this.start.equals(start) && this.end.equals(end)
Method Detail |
---|
public boolean equals(ScheduleItem s)
s
- The object to compare with "this"
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |