uml Draw UML for the above scenario Implement the designed classes, with their attributes and java code dont copy any an
Posted: Sat Feb 19, 2022 3:22 pm
uml Draw UML for the above scenario
Implement the designed classes, with their attributes
and java code
dont copy any answer from answers
Problem 1 1. Identify and Write classes for the following scenario: A prescription is a record that contains medical treatment on a certain date. It has the patient information (id, name, and age), doctor information (name, license no, and specialty), and it might contain at most two drugs prescribed by the physician. Each drug has id, name, and dose. 2. Draw UML for the above scenario 3. Implement the designed classes, with their attributes and methods. Make sure you do a deep copy in the initialization constructor of the prescription class. 4. Add copy constructors for all classes 5. Create a Test class. In the main method, do the following: a. Create two patient objects (pal and pa2), and two doctor objects (drl and dr2) b. Create a prescription prl for the first patient by the first doctor with two drugs for the prescription pr1 c. Create a prescription pr2 for the second patient pa2 by the second doctor dr2 and add the same two drugs for the prescription pr2 d. Print all information for all doctors, all patients, and all prescriptions. e. Change the dose of the second drug for the prescription prl, and print the prescription f. Change the doctor for the prescription prl to be dr2 instead of dr1, and print the prescription
Implement the designed classes, with their attributes
and java code
dont copy any answer from answers
Problem 1 1. Identify and Write classes for the following scenario: A prescription is a record that contains medical treatment on a certain date. It has the patient information (id, name, and age), doctor information (name, license no, and specialty), and it might contain at most two drugs prescribed by the physician. Each drug has id, name, and dose. 2. Draw UML for the above scenario 3. Implement the designed classes, with their attributes and methods. Make sure you do a deep copy in the initialization constructor of the prescription class. 4. Add copy constructors for all classes 5. Create a Test class. In the main method, do the following: a. Create two patient objects (pal and pa2), and two doctor objects (drl and dr2) b. Create a prescription prl for the first patient by the first doctor with two drugs for the prescription pr1 c. Create a prescription pr2 for the second patient pa2 by the second doctor dr2 and add the same two drugs for the prescription pr2 d. Print all information for all doctors, all patients, and all prescriptions. e. Change the dose of the second drug for the prescription prl, and print the prescription f. Change the doctor for the prescription prl to be dr2 instead of dr1, and print the prescription