Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Bonus - Q 5 ( 2 points ) In Class Patient, write the code for the method to generatePatientIDO, which generates a unique patientID for
Bonus Q points In Class Patient, write the code for the method to generatePatientIDO, which
generates a unique patientID for each newly created patient object. The method should do the following:
a generate an ID number consisting of randomly generated numbers.
b Makes sure the generated number is unique for each patient object no two patients should
have the same patient ID
c set the patientID attribute to the created patient object when calling its constructor.
Reference: the method Math cdots.dotsn generates and returns a random number of type double
between and for exar which are all of type double. You can use this
method to generate the You may use other
dom number generation methods.
Q points Consider t below GUI for the log in screen for e hospital management system.
In the last page, you can is
write your code.
The following are the Todos:
points Write the full code for the above GUI No Scene Buider or FXML You program s
be called "Interface.java". Your code has to start from main.
points Implement the functionality of "Log in button as follows:
a Add an object reference called HospMan of type HospitalManagementSystem somev
your class set it to public
b If the user clicks the button, your program should read the values from the Text fiel
ONLY, which are user name and password.
c Then, In HospitalManagementSystem class, there are already two static arrayLists:
and doctors. Your program should:
i Find the patient or doctor who has the same user name as the one in the GI
ii Call the method validate found in the abstract superelass "SystemUser"
object.
If the method validate retums true, you should print the message in command line: "log in sup
otherwise, if the object with the same usemame is not found or vlaidate returns false: print out:
ailed"
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