For a class assignment we've been tasked with making an appointment class that holds some variables and another class that makes an array of the appointment class. But I'm not sure if I'm adding the appointment object correctly.
public class Appointment {
private int date, hour, minute;
private String month, msg;
public Appointment() {
setMonth("APR");
setDate(4);
setHour(0);
setMinute(0);
setMessage("Default Message");
}
//constructor that takes parameters
//main method that creates two objects to test the constructors, will be deleted before finished
//set and get methods
//toString method to print the values the object's variable values
}
public class Planner {
Appointment[] DayPlanner = new Appointment[20];
DayPlanner[0] = new Appointment(); //Error: ']' expected | invalid method declaration; return type required
}