Assume that you have been hired to write a java application for SQU students’ clinic to help receptionist to manage the clinic appointments. There are two type of appointments: emergency appointment and routine appointment. Each appointment has the following information: patient ID, patient name, appointment date and time, and doctor name. Emergency appointment can be scheduled on the same date and the patient symptoms
Assume that you have been hired to write a java application for SQU students’ clinic to help receptionist to manage the clinic appointments. There are two type of appointments: emergency appointment and routine appointment. Each appointment has the following information: patient ID, patient name, appointment date and time, and doctor name. Emergency appointment can be scheduled on the same date and the patient symptoms
Assume that you have been hired to write a java application for SQU students’ clinic to help receptionist to manage the clinic appointments. There are two type of appointments: emergency appointment and routine appointment. Each appointment has the following information: patient ID, patient name, appointment date and time, and doctor name. Emergency appointment can be scheduled on the same date and the patient symptoms
Provide API documentation comments for your class(s), class constructor(s) and method(s) using the Java standard form for documentation comments discussed in this course. • Use meaningful variable and constant names. • Show your name, university id and section number as a comment at the start of each class.
Problem: Assume that you have been hired to write a java application for SQU students’ clinic to help receptionist to manage the clinic appointments. There are two type of appointments: emergency appointment and routine appointment. Each appointment has the following information: patient ID, patient name, appointment date and time, and doctor name. Emergency appointment can be scheduled on the same date and the patient symptoms (e.g. cough, fever, cold, diarrhea, injury, …) should be recorded. While for a routine appointment the patient can decide when he/she would like to have the appointment and the required tests (e.g., blood, x-ray, urine, …) should also be recorded. Your application should read the initial appointments records from a file called “Clinic Appointments.txt” (check Figure 1 for a sample input file). Your program should then display a menu for the receptionist (shown in the sample runs) then he/she can choose the service. For scheduling an appointment, they can choose whether it is an emergency appointment or routine appointment. Then they will be asked to enter the required information as shown in the sample run. The clinic has four doctors (Dr. Ahmed Al Abri, Dr. Muna Mousa, Dr. Hisham Nazim, and Dr. Ismail Mahmood) and patients are assigned to one of these doctors automatically by the system. The receptionist can also check the appointments for a specific patient ID. The system will display the checked appointments sorted by appointment date (Hint: use the Comparable interface). The receptionist can also cancel the next coming (future) appointments or reschedule a coming appointment by changing the date and time. Once receptionist choose to exit the application the system should give them the option to either save the records by updating the initial file or exit without saving.
Transcribed Image Text:Which service de yau want?
Press "1" te schetule an appeintnent
Press te dheck appeintents
Press " te cancel an ppintment
Press " te reschedute an appoiatnent
Press to exit
2
Enter Patient IBI 12345
Appeintment
Patient Patient
Dectar
Appeintment
Type
ID
Mame
Name
Date
Energency
Routine
12345
12345
ALL AL Abri
ALL AT Aari
Br. Ahned Al Abri
Br. Ahned AL Abri
12-11-221 e81 15
Synptonsi fever, celd, ceugh
Tests: blood, x-ray
22-11-2021 1e:3e
Nhich service de you vant?
Press "1" te scheule an apelntnent
Press te check appeintnents
Press " to cancet an ppintment
Press " te reschedule an appointnent
Press te exit
Figure 5: Check an Appointment by Patient ID (results are sorted by appointment dane)
which service do you want?
Press 1" to schedule an appointnent
Press " to check appaintmets
Press to cancel an appeintment
Press 4" to reschedule an appoiatent
Press " to exit
Enter Patient ID: 43234
The sheduled appaintment for Marian Ali(ID: 41234) an 24-11-2021 20:15 is cancelled.
which service do you want?
Press "1" to schedule an appointnent
Press " to check appaintments
Press "" to cancet an appeintment
Press "4" to reschedule an appolatment
Press to exit
Figure 6: Cancel an appointment
Whie service de you ant
Press "1" te schedule an appointment
Press te check appoiatents
Press to cancel an appointnent
Press "4" to reschedu le an appeintment
Press te eit
which service de you vent?
Press "1 ta schedule an appeintment
Press "2" ta check appaintments
Press "1" ta cancel an appaintment
Press 4 ta reschedute an appointnent
Press ta exit
Enter Patient Ib: 44342
No coning appainteent found fer 4442.
You might reed to schedule a sew appoiatment.
Enter Patient Ta: 12345
The coning shedaled appointnent fer Ali AL AbriCIbe 12345) 1is an 22-11-2021 18130
Enter the Appointnent New Bate and Tine as de--yyy thi 4-1-2021 121
The new date and time should be after the current Systen tine. Try again.
which service de ya wantT
Press "1" to schedule an appaintment
Press 2" te check appointents
Press " te cancet an apeintsent
Press "4" te reschedele an pintnent
Press "r te exit
Enter the Appointment New Dete and Tine as dd--y th:mm: 4-1-2022 12:0
Appointment has been updated.
which service da you vant?
Press "1 ta schedule an appeintnent
Press 2 ta check psinteents
Press "1 ta cancel an appoiatent
Press 4 ta reschedute an appoiatsent
Press " ta exit
Figure 7: Reschedule an appointment (Left no future appointment found, Right update a future appointment to a future time)
which service de you vant?
Press "1" te schedute an appeintnent
Press "2" te check appointments
Press "" to cancel an appointnent
Press "4" te reschedute an appointnent
Press " to exit
Which service de you want?
Press "1" te schedule an appeintment
Press "2" to check appeintments
Press 3 te cancel an ppointeent
Press "4 te reschedute an appointment
Press te exit
Invalid chaice.
which service de you vant?
Press "1" to schedule an appointnent
Press " te check appointsents
Press "" te cancel an appointnent
Press "4" te reschedule an appointnent
Neuld you like to save (YN)? Y
Geod Dye. Havea nice day.
BUILD SUCCESSFUL (total timei 6 ninutes e seconds)
Press " to exit
Figure 8: Invalid option
Figure 9: Exit the application with saving option
Energency 132456 |Mohanmed Al Azri|12-11-2821 89:30 |Dr. Muna Mousa |fever, cough
Routine|12345|AlI AL Abrij04-01-2022 12:00 |Dr. Ahned Al Abriblood, x-ray
Routine 32456 Mohamsed Al Aerije2-12-2021 :45 Dr. Mishan Nazinx-ray
Energency |12345 |ALI AL Abri12-11-2021 08:15|Dr. Ahmed Al Abrifever, cold, cough
Emergency 66563JALI Mousa |14-11-2021 22:45 Dr. Hishan Nazin injury
Routine 84326 |Nuha Anur 82-12-2821 09145 Dr. Ismail Hahnood blood
Figure 10: "Cliic Appointments.ce" after the operations applied in Figures 3-9.
Transcribed Image Text:Important: Apply good programming practices:
Provide API documentation comments for your class(s), class constructor(s) and method(s) using the
Java standard form for documentation comments discussed in this course.
• Use meaningful variable and constant names.
• Shów your name, university id and section number as a comment at the start of each class.
• Submit to Moodle the compressed file of your project with name “HWw3_yourlID".
Problem:
Assume that you have been hired to write a java application for SQU students' clinic to help receptionist to
manage the clinic appointments. There are two type of appointments: emergency appointment and routine
appointment. Each appointment has the following information: patient ID, patient name, appointment date and
time, and doctor name. Emergency appointment can be scheduled on the same date and the patient symptoms
(e.g. cough, fever, cold, diarrhea, injury, ...) should be recorded. While for a routine appointment the patient
can decide when he'she would like to have the appointment and the required tests (e.g., blood, x-ray, urine, .)
should also be recorded.
Your application should read the initial appointments records from a file called "Clinic Appointments.txt" (check
Figure I for a sample input file). Your program should then display a menu for the receptionist (shown in the
sample runs) then he/she can choose the service. For scheduling an appointment, they can choose whether it is
an emergency appointment or routine appointment. Then they will be asked to enter the required information
as shown in the sample run. The clinic has four doctors (Dr. Ahmed Al Abri, Dr. Muna Mousa, Dr. Hisham
Nazim, and Dr. Ismail Mahmood) and patients are assigned to one of these doctors automatically by the system.
The receptionist can also check the appointments for a specific patient ID. The system will display the checked
appointments sorted by appointment date (Hint: use the Comparable interface). The receptionist can also cancel
the next coming (future) appointments or reschedule a coming appointment by changing the date and time. Once
receptionist choose to exit the application the system should give them the option to either save the records by
updating the initial file or exit without saving.
Energency 32456 |Mohanned Al Azri|12-11-2021 09:30 |Dr. Huna Mousa|fever, cough
Routine|12345 |Aii AL Abri|22-11-2021 10:30|Dr. Ahned AL Abriblood, x-ray
Routine|32456 Mohanned Al Azri|82-12-2021 é8:45 |Dr. Hishan Nazin x-ray
Energency |12345 |ALi AL Abrij12-11-2021 88:15|Dr. Ahmed Al Abrilfever, cold, cough
Routine|43234 |Marian Ali|24-11-2021 09:15|Dr. Muna Mousa|blood, urine
Energency |44342|Issa Ismail|13-11-2021 13:15 Dr. Muna Mousa fever
Figure 1: Sample Input file "Clinic Appointments r
Nelcone to SOU Students Cunic
hich service de you ant?
Press "1" to schedule an appeintnent
Press "2 te check appointments
Press " te cancet an appoietment
Press 4 te reschedule an appointment
Press " te exit
1
Enter the type of the appolatment IRJoutine ar IE)megency e
Enter Patient IB: 66563
Enter Patient Name: AlI Mousa
Enter the patient's current symptoms separated by connast,): injury
velcone to SOU Students Clinic s
Which service de you want?
Press "1" to schedule an appointment
Press "2" to check appointments
Press "3" to cancel an appointnent
Press "4" to reschedule an sppointment
Which service de you wantt
Press "1" te schedule an appeintment
Press 2 te check appointments
Press "3 te cancel an appointment
Press "4" te reschedule an appointnent
Press " te eit
Press " te exit
Figure 2: Application menu
Figure 3: Schedule Emergeney Appointment
which service do you want?
Press "1" to schedule an appaintment
Press " to check appeintments
Press "3 to cancet an appointment
Press " ta reschetute an appointnent
Press ta exit
Enter the type af the appointment (R)outine or E)megency:>r
Enter Patient ID: 14126
Enter Patient Name: Muha Anur
Enter the required tests separated by commast,): blosd
Enter Appaintment Date and Time as dd-n-yyy th:mm: 2-12-2821 9:45
which service da you want?
Press "1" ta schedule an appsintnent
Press *2 to check appeintents
Press ta cancet an appeintent
Press "4 to reschedute an appointnent
Press ta exit
Figure 4: Schedule Routine Appointment
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.