Page 1 of 1

PROBLEM SOLVING (40 Marks) Based on UML class diagram presented in Figure 1, you are require to complete the java progra

Posted: Tue Jul 12, 2022 8:20 am
by answerhappygod
Problem Solving 40 Marks Based On Uml Class Diagram Presented In Figure 1 You Are Require To Complete The Java Progra 1
Problem Solving 40 Marks Based On Uml Class Diagram Presented In Figure 1 You Are Require To Complete The Java Progra 1 (92.05 KiB) Viewed 39 times
hello sir please help me to answer , please provide within 30min
PROBLEM SOLVING (40 Marks) Based on UML class diagram presented in Figure 1, you are require to complete the java program source code in provided templates. The provided template files as follows; ClinicApp.java, Doctor.java, Patient.java, Availability.java, Consultation.java and Medication.java. Your program should be able to produce the output shown in Figure 2. Complete the program based on the following tasks. Note that, the tasks are also stated in the program source code. The tasks are labeled as Task 1 to Task 7. IMPORTANT NOTE: Do not modify existing code in the given templates. Only modify the codes based on the comments/instructions listed in Task 1 to Task 7. class Class Model Consultation Doctor «enumeration >> Availability Patient ClinicApp buyMedicine Medication
class Class Model Consultation Doctor <<enumeration >> Availability Patient ClinicApp buyMedicine Figure 1: UML class diagram Medication
******** KLINIK MESRA Enter patient name: SITI RAHIMAH BINTI AHMAD Enter patient address: 12, JALAN MULIA, TAMAN BAHAGIA Enter patient phone number: 011222333 Enter patient phone age: 45 ******** KLINIK MESRA ***** 1. Consultation Detail 2. Medication Details 3. Payment Detail 4. Exit Please enter your choice (1-4): 1 ******** Consultation Detail ******** Enter date (dd/mm/yy): 08/07/22 Enter time (24hour format):12 Doctor Detail: Name :Dr. Hafiz Hakim, M.D Specialized in: Infectious diseases Room Number: C-311 Time available from 8.0 to 12.0 ***** KLINIK MESRA ****** Consultation Detail Medication Details 2. B. Payment Detail Exit Please enter your choice (1-4): 2 LIST OF MEDICATION Medication 1.Aspirin tablet 2.Allergy shots 3.Antihistamines 4.Nasal sprays 5.Calamine lotion How many type of medicine?: 2 Enter medicine id: 1 Enter quantity: 2 Item: Aspirin tablet Enter medicine id: 4 Enter quantity: 1 Item: Nasal sprays Description Reduce blood clotting Improve immune system Reduce blood clotting Ease nasal congestion Relieve itchy skin Quantity: 2 Quantity: 1 Price (RM) 20.0 150.5 40.8 70.0 25.5
KLINIK MESRA 1. Consultation Detail 2. Medication Details 3. Payment Detail 4. Exit Please enter your choice (1-4): 3 <<<< PAYMENT DETAIL >>>> Name :SITI RAHIMAH BINTI AHMAD Phone Number: 12, JALAN MULIA, TAMAN BAHAGIA Address: 011222333 List of medication : [1] Item: Aspirin tablet Description : Reduce blood clotting Price: Rm20.00 [2] Item: Nasal sprays Description: Price: Rm70.00 Ease nasal congestion MEDICINE : RM110.00 CONSULTATION FEE : RM25.00 : RM135.00 TOTAL
Task 3: In Patient class, Do the following tasks; i) Define buyMedication(). The method establish the association relationship between Patient and Medication classes. In buyMedication (), the medication objects are added to the ArrayList. ii) Task 4: (4 marks) In Patient class, (2 marks) Do the following tasks; i) Modify the codes in consultDisplay (). The codes should be able to display the consultation date and time.