College of Engineering Department of Computer Science & Information Technology CSC 202 - Programming II Dr. Modafar Ati
Posted: Fri May 20, 2022 6:44 pm
College of Engineering Department of Computer Science & Information Technology CSC 202 - Programming II Dr. Modafar Ati Group Project Introduction: Medical health records are of complex nature. Hence, there is always a need to manipulate sensors readings as well parameters that effect patient's condition to a form that can be modelled for further analysis. The purpose of this project is to map a given medical records to a certain format The aim of this project is to enhance student's communication skills as well as demonstrating their ability to actively participating in a team, and to become an active team player Requirements You are required to write a java program that read the data file medical Records.txt that represent a set of medical readings. Your program should use the UML shown below. Description pleach class and interface are detailed below a Movie Camparable Lady Medic 1. Class Patient consists of the following attributes apid - int bage-int C. gender - int d height - double weight - double 1.getEMIO double Aim of this method is to calculate the BMI of the patient based on his/her height and weight according to the following formula BMI = Weight/(height 0.01 )
2. Class Laboratory, consists of the following attributes a. sbp - int b. dbp-int c. fbs - double d. chol double 0 hdi - double 1. Id-double g. tg-double h. hba1c-double 3. Interface Mapping has the following abstract methods a. mapBMI():double Aim of this method is to map the calculated BMI (wa getBMI method in to a mapping values as per the table below. map Rangel 0179 18-240 25-29,9 30-100 1 2 31 b. mapBlood Pressure:int This method maps the sbp and dbp and as follows: Mapp SBP <130 130 2130 >>150 >200 DBP K80 80 K100 100 2 3 4 SU c. mapFBS(fbs.double):int Aim of this method is to map fbs attribute as per the table below Range 70-110 111 - 140 141-200 201-300 301 - 400 mapa . 211 3 4 5
d. mapCholestrol(chol:double): int Aim of this method is to convert the chol attribute as per the table below Range 50.149 150-184 185199 200 - 249 240500 map 1 2 3 4 5 e. mapHDL (hdl:double): int Aim of this method is to convert the attribute hdi as per the table below: Range 0-39 40-59 60-74 75-99 100 - 200 map 5 4 3 2 1 f. mapLDL(ldi:double):int Aim of this method is to convertidi as per the following table Range 0-99 100-120 130-150 160189 190 - 500 map 1 2 3 4 5 g. getTG( tg: double): Int Aim of this method is to map TG as follows: Range 0-140 150-179 180-190 200-490 500-1000 Larvel 1 2 3 4
1. mapHB1AC (hbate double): int Aim of this method is to map batc attribute as per the table shown below Range 4.G 17 7. 810 9.1.20 1 2 3 4 5 Class Medical Mapper, should implement al interface methods as well as the following methods & convert Gender (gender: Intchar Aim of the method is to convert the gender as follow Road pender Mac cender F b. implement al methods in 3a to 3h above getTotal();int Aim of this method is to total value of attributed excluding pid, age and gender) 5. Write a test class that do the followings a. Create objects of type MedicalMapper b. Reads values in the file medical Records.txt and sign them to the appropriate attributes e. Convert the values read using the mapping methods that are stated in the Mapping interface and implemented in the class Medical Mapper d. Sort the records as per total of the attributes obtained in getTotal Method Wite the converted attributes in an output file using the toString methods. The Files called convertedMedical Records.txt that have a text values . Note that the data in the file are stanged in the following mer pid age gender weight height sbp cop school no hac 7 Below is a sample input and output of the program a. Assume the wput record is read as follow 100245 2726 157 1107013372 2046 139.030.1 185.8 7.5 D. The output after conversion would look like the followings
1002 43 F 29.45 > 2 pld age gender Weight (kg) Height (cm) sbp dbp Tbs chol hidi Idi 19 hba1c getTotal() 1002 43 2 72.6 157 110 70 133.2 204.6 139.0 30.1 185.8 7.5 2 4 1 1 3 3 17 lul Therefore, the output would be as follow 1002 43 F 2 1 2 4 1 1 3 3 17 Notes: 1. Submission of the project is no later than 6 June 2022 2. Each group has a maximum of 3 students 3. You are required to submit a soft copy of your code and a document that has screenshots of the program in a compressed file via Blackboard. 4. You are required to give me a simple demo of your code 5. Submission via BB only and any other submission means will be discarded
2. Class Laboratory, consists of the following attributes a. sbp - int b. dbp-int c. fbs - double d. chol double 0 hdi - double 1. Id-double g. tg-double h. hba1c-double 3. Interface Mapping has the following abstract methods a. mapBMI():double Aim of this method is to map the calculated BMI (wa getBMI method in to a mapping values as per the table below. map Rangel 0179 18-240 25-29,9 30-100 1 2 31 b. mapBlood Pressure:int This method maps the sbp and dbp and as follows: Mapp SBP <130 130 2130 >>150 >200 DBP K80 80 K100 100 2 3 4 SU c. mapFBS(fbs.double):int Aim of this method is to map fbs attribute as per the table below Range 70-110 111 - 140 141-200 201-300 301 - 400 mapa . 211 3 4 5
d. mapCholestrol(chol:double): int Aim of this method is to convert the chol attribute as per the table below Range 50.149 150-184 185199 200 - 249 240500 map 1 2 3 4 5 e. mapHDL (hdl:double): int Aim of this method is to convert the attribute hdi as per the table below: Range 0-39 40-59 60-74 75-99 100 - 200 map 5 4 3 2 1 f. mapLDL(ldi:double):int Aim of this method is to convertidi as per the following table Range 0-99 100-120 130-150 160189 190 - 500 map 1 2 3 4 5 g. getTG( tg: double): Int Aim of this method is to map TG as follows: Range 0-140 150-179 180-190 200-490 500-1000 Larvel 1 2 3 4
1. mapHB1AC (hbate double): int Aim of this method is to map batc attribute as per the table shown below Range 4.G 17 7. 810 9.1.20 1 2 3 4 5 Class Medical Mapper, should implement al interface methods as well as the following methods & convert Gender (gender: Intchar Aim of the method is to convert the gender as follow Road pender Mac cender F b. implement al methods in 3a to 3h above getTotal();int Aim of this method is to total value of attributed excluding pid, age and gender) 5. Write a test class that do the followings a. Create objects of type MedicalMapper b. Reads values in the file medical Records.txt and sign them to the appropriate attributes e. Convert the values read using the mapping methods that are stated in the Mapping interface and implemented in the class Medical Mapper d. Sort the records as per total of the attributes obtained in getTotal Method Wite the converted attributes in an output file using the toString methods. The Files called convertedMedical Records.txt that have a text values . Note that the data in the file are stanged in the following mer pid age gender weight height sbp cop school no hac 7 Below is a sample input and output of the program a. Assume the wput record is read as follow 100245 2726 157 1107013372 2046 139.030.1 185.8 7.5 D. The output after conversion would look like the followings
1002 43 F 29.45 > 2 pld age gender Weight (kg) Height (cm) sbp dbp Tbs chol hidi Idi 19 hba1c getTotal() 1002 43 2 72.6 157 110 70 133.2 204.6 139.0 30.1 185.8 7.5 2 4 1 1 3 3 17 lul Therefore, the output would be as follow 1002 43 F 2 1 2 4 1 1 3 3 17 Notes: 1. Submission of the project is no later than 6 June 2022 2. Each group has a maximum of 3 students 3. You are required to submit a soft copy of your code and a document that has screenshots of the program in a compressed file via Blackboard. 4. You are required to give me a simple demo of your code 5. Submission via BB only and any other submission means will be discarded