Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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) {

image text in transcribedimage text in transcribedimage text in transcribed

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students also viewed these Databases questions

Question

Write a while loop that executes until user_choice is false

Answered: 1 week ago

Question

=+Which associations exist?

Answered: 1 week ago