Question
Hello, help me understand how to write those methods in JAVA. (Please don't use bufferedreader) Write a patient management program. You have two .txt files:
Hello, help me understand how to write those methods in JAVA. (Please don't use bufferedreader)
Write a patient management program. You have two .txt files:
- Patient.txt with id, names and the doctor they are seeing (e.g. 123, John Doe, Jason Smith)
- Doctors.txt with the doctors name and the Doctor's id (e.g. Jason Smith, JS1) , (Linda Hernandez, LH1)
Write the following methods:
1) Get the count of the Doctors.
+getDoctorCount() :Integer
2) Get the number of patients with the same Doctor by index
+getPatientCount(doctorIndex: Integer) : Integer
3) Get the number of the patients from all Doctors.
+getPatientCount() : Integer
4) Get the number of patients with the specified Doctor.
+getPatientCount(doctorName: String) : Integer
5) Get the Doctors Name at a specific index.
+getDoctorsName(doctorIndex: Integer) : String
6) Get the patient name with a specific Doctor and the patient id
+getPatient(doctorIndex: Integer, patientIndex: Integer) : Patient
7) Get a copy of a patient array for the Doctor at the specified index
+getPatients(doctorIndex: Integer) : Patient[ ]
8) Get the first Doctor index thats matches the specified patient id.
+findPatientDoctor(id: String) : Integer
Thank you.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started