As previous stages have already done for Doctor.java, patient.java, time.java, timeslot.java and appointment.java Just need to get help on this stage with following.
public ArrayList getMissingSpecialists() {
public boolean add(Appointment appointment) {
public void remove(Doctor doc) {
public void sort() {
public ArrayList getConflictingAppointments(AppointmentDiary other) {
1 package option1.stage4; 3 import java.io. FileNotFoundException ;g 12 public class AppointmentDiary 14 15 16 private String practiceName; private ArrayList
appointments; private ArrayList doctors; 18 19 20 21 public AppointmentDiary)i DO NOT MODIFY * initialize an empty appointment diary ak practiceName = "TBA". appointments new ArrayList; doctors = new ArrayListDoctor(); 23 24 25 26 27e k 28 29 30 31 32 DO NOT MODIFY Read appointment diary from the data files *@param name @param filenameDocs @param filenameAppointments @throws Exception 34 35 36 37 38 39 40 41 42 43 ak public AppointmentDiary(String name, String filenameDocs, String filenameAppointments) throws Exception practiceName name; appointments new ArrayList); doctorsnew ArrayList; Scanner scannernew Scanner(new FileReader(filenameDocs)); for(int 1-0; 4; i++) { //ignore first 4 lines scanner.nextLine); String line; while (true) I try 45 46 47 48 49 50 51 52 53 54 linescanner.nextLine) catch (Exception e) f break; line-line.trim(); String[] tokens =line.split(", "); doctors.add(new Doctor(tokens [0].trim), tokens [1].trim())) scanner.close); scannernew Scanner(new FileReader(filenameAppointments)); while(true) { 56 57 58 59 60 61 62 63 try line - scanner.nextLine) catch(Exception e) break; 1 package option1.stage4; 3 import java.io. FileNotFoundException ;g 12 public class AppointmentDiary 14 15 16 private String practiceName; private ArrayList appointments; private ArrayList doctors; 18 19 20 21 public AppointmentDiary)i DO NOT MODIFY * initialize an empty appointment diary ak practiceName = "TBA". appointments new ArrayList; doctors = new ArrayListDoctor(); 23 24 25 26 27e k 28 29 30 31 32 DO NOT MODIFY Read appointment diary from the data files *@param name @param filenameDocs @param filenameAppointments @throws Exception 34 35 36 37 38 39 40 41 42 43 ak public AppointmentDiary(String name, String filenameDocs, String filenameAppointments) throws Exception practiceName name; appointments new ArrayList); doctorsnew ArrayList; Scanner scannernew Scanner(new FileReader(filenameDocs)); for(int 1-0; 4; i++) { //ignore first 4 lines scanner.nextLine); String line; while (true) I try 45 46 47 48 49 50 51 52 53 54 linescanner.nextLine) catch (Exception e) f break; line-line.trim(); String[] tokens =line.split(", "); doctors.add(new Doctor(tokens [0].trim), tokens [1].trim())) scanner.close); scannernew Scanner(new FileReader(filenameAppointments)); while(true) { 56 57 58 59 60 61 62 63 try line - scanner.nextLine) catch(Exception e) break