Question: Your task is to write a JAVA program that reads and processes four blood sugar test readings for one day. Your program should ask the

Your task is to write a JAVA program that reads and processes four blood sugar test readings for one day. Your program should ask the user to enter their blood sugar test readings for today. You must use a FOR loop construct to collect the input for blood sugar test readings one at a time until all four of the days test readings are collected.

After all of the readings are collected from the user, your program should print the information about the highest and lowest readings and the average of all of the days readings. All output should have meaningful descriptions.

While you cant yet recover from errors generated by users entering character data for input, make sure you validate numbers entered by the user are within appropriate numeric ranges for correct input to the program.

Program 1 sample execution & output: Enter data for today:

Enter the blood sugar test reading for test 1: 180

Enter the blood sugar test reading for test 2: 202

Enter the blood sugar test reading for test 3: 121

Enter the blood sugar test reading for test 4: 350 T

Test Reading 4 had the highest blood sugar level with 350.0 mg/dL

Test Reading 3 had the lowest blood sugar level with 121.0 mg/dL Your average blood sugar level for today was 213.25 mg/dL

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!