akes readings of blood sugar level for its inpatients every day. Write a Java application to create a class with attributes patient name, patient_ID, age, readings of blood sugar test stored in an array. Define methods to get the patien
Task 3: Arrays (JAVA)
Al Zila Hospital takes readings of blood sugar level for its inpatients every day. Write a Java application to create a class with attributes patient name, patient_ID, age, readings of blood sugar test stored in an array. Define methods to get the patient details, print their details and calculate highest, lowest and average blood sugar levels based on the readings recorded. And the code should have (Do you want to Continue for other patient Y/N?).
Sample Test case:
Enter Patient details: Name: Salim, ID: P2218, Age: 53, No of readings: 5
Enter the readings in mg/dL: 160 140 120 140 150
Highest blood sugar level: 160, Lowest blood sugar level: 120, Average blood sugar level: 142
Do you want to Continue for other patient Y/N?
Step by step
Solved in 4 steps with 2 images