ich service de you vent ? Press "" ta schetule an appointent Press " ta check appeintaents Press "" ta cancel as ppintnent Press ta reschedule a osinteent Press te xit Ester Patient 10i 1245 Appointnent Type Petient Patient Mane Dector Nane Apointnent Date teergeny Rastine AL AL Abri ALL AL Abri Or. Ahned Al Abri 12-11-21 a15 Or. Ahned Al Abri 22-11-21 1 20 Symptans fever, cold, cgh Testa blot, ray 1234 ich service ds you vent? Press "" te schetule an appolatent Press " ta theck pintnents Press " ta cancel as psintnent Press "4 ta reschedule an psinteent Press " ta exit Figure S: Check an Appointment by Patient ID (results are soted by appointment date)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Please Use java.

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.

Nhich service da you vant?
Press "1 ta schedule an appointment
Press "2" ta check appeintnents
Press "3" to cancel an appeintnent
Press "4" ta reschedule a posinteent
Press " ta exit
Enter Patient 10: 12345
Appointsent
Type
Patient
ID
Patient
Nane
Dector
Name
Appnintnent
Date
Energency
Nautine
12345
ALi AL Abri
Or. Ahned AL Abri
12-11-2021 a1:15
Or. Ahned AL Abri
Symptans: fever, cold, caugh
Testa: bload, -ray
12345
ALI AL Abri
22-11-2021 130
hich service de you vant ?
Press "1" ta schedule an appointnent
Press " ta check appeintnents
Press "J" ta cancel an appeintment
Press "4 te reschedule an appainteent
Press " ta exit
Figure 5: Check an Appointment by Patient ID (results are sorted by appointment date)
Which service do you want?
Press "1 to schedule an appeintment
Press "2" to check appointments
Press "3" to encel an appointment
Press "4" to reschedute an appsintment
Press " te exit
Enter Patient ID: 43234
The sheduled appointment for Marian AtilID: 41234) on 24-11-2021 20:15 is cancetled.
which service do you want?
Press "1 to schedule an appelateent
Press "2 te check appointments
Press "3" to cancel an appointment
Press "4 te reschedule an appaintmen
Press " to exit
Figure 6: Cancel an appointment
hich service de you ant
Press "1" te schedule an appointment
Press "2" te check appaintments
Press "1" te cancel an appaintnent
Press "4" te reschedule an appaintnent
Press " te exit
4
Enter Patient 44342
No coning appoistnent feund for 44342.
You sight need to schedele a new appolatment.
Which service do you went?
Press "1" ta ichedule an appaintment
Press "2" ta check appointnents
Press "3 to cancel an appeintnent
Press "4 to reschedule an appeintnent
Press to exit
4
Enter Patient ID: 12345
The coming sheduled appointment for Ali AL Abri(ID: 12145) is an 22-11-2821 10:18
Enter the Appeintnent Mew Date and Tine as dd--yyy hhm: -1-2921 12:0
The sew date and time should be after the current Systen tine, Try again.
which service de you want?
Press "1" te schedule an appolntment
Press "2 te check appaintnents
Press "3 te cancel an appsintnent
Press "4 te reschedule an appaintment
Press " to exit
Enter the Appointment Mew Date and Time as ed-n-yy hh:m: 4-1-2022 12:00
Appaintment han been updated.
which service do you vant
Press 1 to schedule an appointment
Press 2" to check appointments
Press ta cancel an ppeintnent
Press "4" ta reschedule an appeintnent
Press " to exit
Figure 7: Reschedule an appointment (Left no future appointment found, Right update a future appointment to a future time)
which service do you want?
Press "1" to schedule an appointment
Press "2" to check appointments
Press "3" to cancel an appointsent
Press *4" to reschedule an appointeent
Press " to exit
which service do you vant?
Press "1" to schedule an appeintnent
Press "2" to check appointents
Press " to cancel an appointnent
Press "4" to reschedule an appointment
Press " to exit
Invalid choice.
which service do you want?
Press "1" to schedule an appointment
Press "2 to check appointaents
Press 3 to cancel an appointment
Press "4" to reschedule an appointaent
Press ta exit
Nould you Like to save (YN)? Y
Good Bye. Have a nice day.
BUILD SUCCESSFUL (total timei 6 ninutes e secends
Figure 8: Invalid option
Figure 9: Exit the application with saving option
Energency |32456 |Mohamned AL Azri|12-11-2021 09:30|Dr. Muna Mousa|fever, cough
Routine |12345|Ali AL Abrij04-01-2022 12:00|Dr. Ahned Al Abriblood, x-ray
Routine |32456 |Mohanned Al Azri82-12-2821 8B:45 |Dr. Hishan Nazin|x-ray
Energency|12345 |Ali Al Abri|12-11-2821 88:15|Dr. Ahned AL Abri fever, cold, cough
Energency 44342 Issa Ismaitj13-11-2821 13:15 Dr. Muna Mousa| fever
Energency 66563JALI Mousa |14-11-2021 22:45|Dr. Hisham Nazinj injury
Routine 84326 |Nuha Amur 02-12-2821 89:45|Dr. Ismail Mahmoodjblood
Figure 10: "CZinic Appointments. after the operations applied in Figures 39.
Transcribed Image Text:Nhich service da you vant? Press "1 ta schedule an appointment Press "2" ta check appeintnents Press "3" to cancel an appeintnent Press "4" ta reschedule a posinteent Press " ta exit Enter Patient 10: 12345 Appointsent Type Patient ID Patient Nane Dector Name Appnintnent Date Energency Nautine 12345 ALi AL Abri Or. Ahned AL Abri 12-11-2021 a1:15 Or. Ahned AL Abri Symptans: fever, cold, caugh Testa: bload, -ray 12345 ALI AL Abri 22-11-2021 130 hich service de you vant ? Press "1" ta schedule an appointnent Press " ta check appeintnents Press "J" ta cancel an appeintment Press "4 te reschedule an appainteent Press " ta exit Figure 5: Check an Appointment by Patient ID (results are sorted by appointment date) Which service do you want? Press "1 to schedule an appeintment Press "2" to check appointments Press "3" to encel an appointment Press "4" to reschedute an appsintment Press " te exit Enter Patient ID: 43234 The sheduled appointment for Marian AtilID: 41234) on 24-11-2021 20:15 is cancetled. which service do you want? Press "1 to schedule an appelateent Press "2 te check appointments Press "3" to cancel an appointment Press "4 te reschedule an appaintmen Press " to exit Figure 6: Cancel an appointment hich service de you ant Press "1" te schedule an appointment Press "2" te check appaintments Press "1" te cancel an appaintnent Press "4" te reschedule an appaintnent Press " te exit 4 Enter Patient 44342 No coning appoistnent feund for 44342. You sight need to schedele a new appolatment. Which service do you went? Press "1" ta ichedule an appaintment Press "2" ta check appointnents Press "3 to cancel an appeintnent Press "4 to reschedule an appeintnent Press to exit 4 Enter Patient ID: 12345 The coming sheduled appointment for Ali AL Abri(ID: 12145) is an 22-11-2821 10:18 Enter the Appeintnent Mew Date and Tine as dd--yyy hhm: -1-2921 12:0 The sew date and time should be after the current Systen tine, Try again. which service de you want? Press "1" te schedule an appolntment Press "2 te check appaintnents Press "3 te cancel an appsintnent Press "4 te reschedule an appaintment Press " to exit Enter the Appointment Mew Date and Time as ed-n-yy hh:m: 4-1-2022 12:00 Appaintment han been updated. which service do you vant Press 1 to schedule an appointment Press 2" to check appointments Press ta cancel an ppeintnent Press "4" ta reschedule an appeintnent Press " to exit Figure 7: Reschedule an appointment (Left no future appointment found, Right update a future appointment to a future time) which service do you want? Press "1" to schedule an appointment Press "2" to check appointments Press "3" to cancel an appointsent Press *4" to reschedule an appointeent Press " to exit which service do you vant? Press "1" to schedule an appeintnent Press "2" to check appointents Press " to cancel an appointnent Press "4" to reschedule an appointment Press " to exit Invalid choice. which service do you want? Press "1" to schedule an appointment Press "2 to check appointaents Press 3 to cancel an appointment Press "4" to reschedule an appointaent Press ta exit Nould you Like to save (YN)? Y Good Bye. Have a nice day. BUILD SUCCESSFUL (total timei 6 ninutes e secends Figure 8: Invalid option Figure 9: Exit the application with saving option Energency |32456 |Mohamned AL Azri|12-11-2021 09:30|Dr. Muna Mousa|fever, cough Routine |12345|Ali AL Abrij04-01-2022 12:00|Dr. Ahned Al Abriblood, x-ray Routine |32456 |Mohanned Al Azri82-12-2821 8B:45 |Dr. Hishan Nazin|x-ray Energency|12345 |Ali Al Abri|12-11-2821 88:15|Dr. Ahned AL Abri fever, cold, cough Energency 44342 Issa Ismaitj13-11-2821 13:15 Dr. Muna Mousa| fever Energency 66563JALI Mousa |14-11-2021 22:45|Dr. Hisham Nazinj injury Routine 84326 |Nuha Amur 02-12-2821 89:45|Dr. Ismail Mahmoodjblood Figure 10: "CZinic Appointments. after the operations applied in Figures 39.
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 “HW3_yourlD".
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 AI 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|32456IMohansed Al Azri|12-11-2021 69: 30 [Dr. Huna Mousa fever, cough
Routine 12345 |AiL AL Abri|22-11-2021 10:30 Dr. Ahned Al Abriblood, x-ray
Routine |32456 Mohanned AL Azrij82-12-2021 ÓB:45 |Dr. Hishan Nazin x-ray
Energency |12345 |Ali AL Abri|12-11-2021 08: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."
Melcome tO SUU students Ctanic
whsch service do you want?
Press "1" to schedule an appointnent
Press "2 to check appintnents
Press "3 to cancel an appaintment
Press "4 to reschedule an appoietmest
Press " to exit
Enter the type of the appointment (R)outine or (Elnegency:>
Enter Patient ID: B6S43
Enter Patient Mame: Ali Mouse
Enter the patient's carrent symptoms separated by comast,: injury
Vetcome to squ Students Clinic
Which service do you want?
Press "1 ta schedule an appinteent
Press "2" to check appaintnents
Press 3 to cancel an appointnent
Press "4" to reschedule an appointment
Press a to exit
hich service do you want?
Press "1" to schedule an appointment
Press "2" to check appaintments
Press "3" to cancel an appointment
Press "4 to reschedule an appointment
Press " to exit
Figure 2: Application menu
Figure 3: Schedule Emergeney Appointment
which service da you want?
Press "1" ta schedule an appointnent
Press "2" ta check appointments
Press "" to cancel an appointeent
Press "4" ta reschedule an appointment
Press " ta exit
Enter the type af the appointment Ioutine or (Elmegency:r
Enter Patiest 10: 84326
Enter Patient Nane: Muha Amur
Enter the reeuired tests separated by conmas(, blaed
Enter Appointment Date and Time as de--yyry mi 2-12-2021 9145
which service de you want?
Press "1" to schedule an appeintnent
Press "2" to check appointments
Press "J" ta cancel an appaintment
Press "4 ta reschedule an appointment
Press " to xit
Figure d. Sehadula Routine Appointmant
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 “HW3_yourlD". 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 AI 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|32456IMohansed Al Azri|12-11-2021 69: 30 [Dr. Huna Mousa fever, cough Routine 12345 |AiL AL Abri|22-11-2021 10:30 Dr. Ahned Al Abriblood, x-ray Routine |32456 Mohanned AL Azrij82-12-2021 ÓB:45 |Dr. Hishan Nazin x-ray Energency |12345 |Ali AL Abri|12-11-2021 08: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." Melcome tO SUU students Ctanic whsch service do you want? Press "1" to schedule an appointnent Press "2 to check appintnents Press "3 to cancel an appaintment Press "4 to reschedule an appoietmest Press " to exit Enter the type of the appointment (R)outine or (Elnegency:> Enter Patient ID: B6S43 Enter Patient Mame: Ali Mouse Enter the patient's carrent symptoms separated by comast,: injury Vetcome to squ Students Clinic Which service do you want? Press "1 ta schedule an appinteent Press "2" to check appaintnents Press 3 to cancel an appointnent Press "4" to reschedule an appointment Press a to exit hich service do you want? Press "1" to schedule an appointment Press "2" to check appaintments Press "3" to cancel an appointment Press "4 to reschedule an appointment Press " to exit Figure 2: Application menu Figure 3: Schedule Emergeney Appointment which service da you want? Press "1" ta schedule an appointnent Press "2" ta check appointments Press "" to cancel an appointeent Press "4" ta reschedule an appointment Press " ta exit Enter the type af the appointment Ioutine or (Elmegency:r Enter Patiest 10: 84326 Enter Patient Nane: Muha Amur Enter the reeuired tests separated by conmas(, blaed Enter Appointment Date and Time as de--yyry mi 2-12-2021 9145 which service de you want? Press "1" to schedule an appeintnent Press "2" to check appointments Press "J" ta cancel an appaintment Press "4 ta reschedule an appointment Press " to xit Figure d. Sehadula Routine Appointmant
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY