Question
According to the Inheritance principle you have to design and implement a superclass Person and the subclasses Doctor and Patient. The class Person should include
According to the Inheritance principle you have to design and implement a superclass Person and the subclasses Doctor and Patient.
The class Person should include appropriate methods to comply with the encapsulation principle and hold information about the name, surname, date of birth and mobile number.
The Doctor subclass should hold specific information and methods. You should add the medical licence number and the specialisation (e.g. cosmetic dermatology, medical dermatology, paediatric dermatology, etc.) as instance variables and the relative get/set methods
The Patient subclass should hold specific information and methods. You should add a unique patient id as instance variables (attribute) and the relative get/set methods
You should implement a class Consultation to represent the booked consultation with a specific doctor from a patient. The class should hold information about: the date and time slot for the consultation, the cost, notes, and the relative get/set methods
Design and implement a class called WestminsterSkinConsultationManager, which implements the interface SkinConsultationManager (2 marks). WestminsterSkinConsultationManager maintains the list of doctors and provides all the methods for the system manager.
The class WestminsterSkinConsultationManager should display in the console a menu, containing the following management actions from which the user can select one:
. Add a new doctor to the system. It should be possible to add a new doctor, with all the relevant information. You should consider that the centre can allocate a maximum of 10 doctors.
Delete a doctor from the system, selecting the medical licence number. Display a message with the information of the doctor that has been deleted and the total number of doctors in the centre
Print the list of the doctors in the consultation centre. For each doctor, print on the screen all the stored information. The list should be ordered alphabetically according to the doctor's surname
Save in a file all the information entered by the user so far. The next time the application starts it should be able to read back all the information saved in the file and continue to use the system
How to write the java code for this?
You should implement the GUI according to the following requests using Java swing
The user can visualise the list of doctors with relative information. The user should be able to sort the list alphabetically. You are suggested to use a table to display this information on the GUI but you can choose any other solution. (6 marks). The user can select a doctor and add a consultation with that specific doctor. When implementing these functionalities, you need to comply with the following requirements:
The user can check the availability of the doctor in a specific date/time and can book a consultation for a patient if the doctor is available.
If the doctor is not available automatically another doctor will be allocated, who is available in that specific date/time. The choice of doctor has to be done randomly among all available doctors
For each consultation, the user has to: Add patient information (add all the attributes defined above - name, surname, date of birth, mobile number, id)
Enter and save the cost of the consultation. Consider that each consultation is 25 per hour and the first consultation is 15 per hour
Add some notes (this could be textual information or the user could upload some images of the skin). This information should be encrypted in order to preserve data privacy. you can use available APIs for the encryption of data.
Once the consultation has been saved in the system, the user can select it and visualise all the stored information
how to implement this GUI using java swing?
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