/** Class Name: Appointment ----------------------- Version: 0.1 ---------------------- Written by: Aaron Cripps License: GPLv2 -------------- For more information, please see http://www.gnu.org/copyleft/gpl.html Purpose: -------- This class is designed to provide an object that will hold all the variables required for an effective appointment note. It has been purposely left as a barebones object, with plenty of room for extensibility. **/ public class Appointment{ public Appointment(String a, String b, String c, String d){ description = a; date = b; s_time = c; e_time = d; } private String description; private String date; private String s_time; private String e_time; //accessor methods so that the values *hidden* in the private variables are available for //other classes to use. public String getDescription(){ return description; } public String getDate(){ return date; } public String getStartTime(){ return s_time; } public String getEndTime(){ return e_time; } //a general toString method so that the ugly one from the Object class doesn't get called. public String toString(){ return "[Description = " + getDescription() + ", Date = " + getDate() + ", Start Time = " + getStartTime() + ", End Time = " + getEndTime() + "]"; } } //EOF AppointmentCalendar: method = public boolean searchAppointment(String a, String b, String c, String d): //this method searches for ONE appointment meeting the exact criteria specified. If one is not //found, it doesn't do anything. Extra functionality can be added to this later, like allowing //a search for multiple items, or even overloaded methods that search for any of the criterion. public Appointment searchAppointment(String a, String b, String c, String d){ one = -1; two = -1; for(int i=0; i>calendar.size();i++){ for(int j=0;j