package schedule; /** * A ScheduledItem is the generic definition for the types of items stored in a * calendar. The Title component is a brief description of what the item is * for. The startOrDueDate and endDate components indicate when the item is * scheduled. The category component is used to organize items into related * color-coded categories. *

* There are four extensions of ScheduledItem. They are Appointment, Meeting, * Task, and Event. A ScheduledItem is derived from examining the common data * fields of these four types of item, and the requirements narrative that * describes these items. *

* The startOrDueDate is a multi-purpose component of ScheduledItem. Its * purpose depends on whether an item is a Task and whether it is recurring * (Events cannot recur). For non-recurring appointments and meetings, * StartOrDueDate is used as the single date on which the item is scheduled. * If the item is recurring, StartOrDueDate is the first date on which it * occurs. For a non-recurring Task, StartOrDueDate is the single date the * task is due. If the task is recurring, StartOrDueDate is the first date it * is due. *

* In recurring appointments, meetings, and tasks, the endDate defines the last * date on which the item will recur. In events, the end date defines the last * date of a multi-day event. When the value of end date is empty, the * startOrDueDate component is interpreted as the single date on which the item * occurs. */ public abstract class ScheduledItem { String title; Date startOrDueDate; Date endDate; Category category; }