Sale!

COMP642 Object Oriented Programming Assignment 2 Solved

Original price was: $40.00.Current price is: $35.00. $29.75

Category:

Description

5/5 - (1 vote)

Design and implement in Python, a set of classes that work together to manage information
for a small medical centre. Once implemented, the application must be able to:
• Keep track of doctors, patients and consultations.
• Create doctors.
• Create patients.
• Assign doctor to a patient.
• Add a consultation.
• Search for a doctor.
• Display doctor’s information.
• Search for a patient.
• Display patient’s information.
• Display consultation report.
• Display all patients.
• Display all doctors.
• Display patient list for a particular doctor.
• Display consultation list for a particular doctor.
• Display consultation list for a particular patient.
Your design should be based on the Model View Controller (MVC) pattern:
• The model deals with the information about patients, doctors, and consultations.
• The controller class should look after creating and maintaining objects in the model.
• The system must support the development of different views in which user can
interact with the system (such as form, web form or data from files).
COMP642 | OO programming Assignment 2 | Page 2
The class diagram for this application is shown below, where the Patient, Doctor and
Consultation classes are the model, and the Clinic class is the controller.
Figure 1 Class Diagram

Criteria
Your application must:

• Run correctly to the specified requirements.
• Read the supplied files and create the appropriate doctor and patient objects, files
described below.
• Assign a doctor to a patient.
• Add a consultation between a doctor and patient which may contain information
about the date, reason for appointment and fee.
• Display full information for a selected doctor with the list of the patients they have
and the list of consultations.
• Display full information of a selected patient, the doctor’s name, a list of
consultations and the total fees due.
• Display the consultation report for the clinic.
• Have a user interface with:
o appropriate controls
o useful feedback
o prevention of input errors

Your code must:

• Make appropriate use of the model and controller classes provided based on the
class diagram shown in Figure 1.
• Well-structured and easy to maintain.
• Be appropriately commented.
• Each class must provide getter and setter methods and any other appropriate
methods.
COMP642 | OO programming Assignment 2 | Page 3

What you are to do:

You are to create a Python application to manage the medical centre. The two files
“Patient.txt” and “Doctor.txt” contain information about doctors (first name, last name and
specialisation) and patient (first name and last name) and can be downloaded from
COMP642 web page.
1. Implement the class diagram shown in Figure 1 so that:
• A patient can be assigned to a doctor.
• A consultation can be added for a patient and a doctor.
• It provides the following information for a doctor:
• The doctor personal information (id number, full name and specialisation).
• The list of patients.
• The list of consultations with patients.
Example 1: Possible doctor information report format.
• It should provide the following information for a patient:
• The patient personal information (patient number and full name).
• The doctor information.
• The list of consultations and total fees due.
Example 2: Possible patient information report format.
COMP642 | OO programming Assignment 2 | Page 4
• It should display the consultation report, example below.
Example 3: Possible Consultation Report format.
2. Write and test the code for all the classes.
3. Write code for an application that uses the classes to:
• Read the files and create the appropriate doctors and patient objects (your
Controller will have methods to create these objects).
• Implement an appropriately designed view (GUI interface). An example is shown
in Figure 2 that will:
• Allow the user to assign a patient to a doctor.
• Allow the user to add a consultation.
• Allow the user to view full information about a selected doctor.
• Allow the user to view full information about a selected patient.
• Allow the user to view the consultation report.
Figure 2 Possible Interface
All patients
All doctors
Consultation
details
Consultation report
Assign a doctor
to a patient
Add a
consultation
Doctor’s
information
Patient’s
information
COMP642 | OO programming Assignment 2 | Page 5
4. Your application:
• Does not have to provide facilities for the user to add new doctors or patients, or
to delete existing objects.
• Does not have to provide facilities for a user to amend details of consultations,
doctors or patients (other than adding new consultations).
Note: You may add additional methods as you see fit. You do not need to replicate the GUI
provided in Figure 2. Feel free to design your own user interface.
Marking
Criteria Marks (out of 100)
Model (Patient, Doctor, Consultation) 30
Controller 30
User Interface 20
Error handling 10
Coding style, comments, clear logic 10
Text Files
Doctor.txt
James,Wright,General Practitioner
Katie,McDonnell,Gynaecologist
Humphrey,Gray,Surgeon
Julius,Barnes,Paediatric
Vicky,Scott,General Practitioner
Patient.txt
Misha,Patel
Kevin,Chin
Doris,Grant
Andrew,Smith
Gregory,Hart
Samantha,Burn
Candice,Biggs
Joe,Rourke
Rowan,Chang
Henrietta,Mann