Using visual basic Your task is to create an application to assist a user with a
ID: 646344 • Letter: U
Question
Using visual basic
Your task is to create an application to assist a user with analyzing the daily readings from monitoring blood sugar.
Create an application with an "Input Blood Sugar Readings" button that uses the InputBox method to let the user enter how many readings from a blood sugar tested are to be evaluated. The maximum amount will be 30--there might be only 3 or 4 but the max is 30. Based on that number, the application should use an InputBox to allow the user to enter the readings and store the readings into an array. Declare the array as a class level variable so that all methods for buttons have access to the values.
The application should also have the following buttons:
"Display Values" - display the input values
"Display Average" - When the button is clicked, the program should display the average of the readings.
"Display Max" - When the button is clicked, the program should display the maximum reading and the day it occurred.
"Display Min" - When the button is clicked the program should display the minimum reading and the day it occurred.
Use constants as appropriate. Include comments with your name and a summary at the top and within each method as appropriate.
Any help would be greatly appreciated. I have no idea where to start.
Explanation / Answer
See First you should start the VB in your computer. When the VB IDE opens, a dotted screen will appear at the center. In that screen you will draw your buttons. 4 in number.
When you double click any one command button, you will get the code window open for you as follow:
Private Sub Command1_Click
(write your program code here)>
End Sub
So you ll write code in middle of procedure.
For inputbox, you can double click the InputBlood Sugar Reading button and write:
int Reading[30]= Inputbox("Enter your Sugar readings");
it will store the readings in variable reading.
1.For Display values command button:
Text2.text= Reading[30];
2.For display Average button:
Avg= Average(Reading[30])
Text3.Text= Avg;
3. For display max button:
maximum= max(Reading[30]);
Text4.text= maximum;
4. For display min button:
minimum=min(Reading[30]);
Text5.Text=minimum;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.