Type your programming question here…I need help creating this program, I have the GUI all setup however I am newer to VB and do not know where to start in order to do thisInstructionsWrite a Visual Basic program named TemperatureData that stores daily high temperatures for a certain (customizable) number of days. The TemperatureData program should also provide buttons that, when clicked, display the coldest (minimum), warmest (maximum), or average temperature stored in the program. Read on for additional information.GUI designYour GUI should be similar to the following image:Sample GUI for Homework 5. Top: ‘New temperature:’, a text box, and an Add button. Left: ListBox shows temperatures. Right: ‘Find Coldest’, ‘Find Warmest’, ‘Find Average’, and ‘Clear All’ buttons.Suggested control names are:Top row: newTempLabel / newTempTextBox / addButtonLeft side: tempsListLabel / tempsListBoxRight side: coldestButton / warmestButton / averageButton / clearAllButtonProperties:Set the AcceptButton property of the Form to addButton, so that the Add button is triggered by default when the Enter key is pressed.Set the Text property of the Form to ‘Temperature Data’.No other changes to any controls’ properties are needed right now. You will make some changes in your code later.Instance variables and constantYour program must start by declaring a constant and two instance variables outside any other method in the program:A constant of type Integer that indicates the largest number of temperatures that can be stored in the program. Suggested name: MAX_NUM_TEMPS.An array of type Double that stores the actual temperatures entered by the user. The array elements should be numbered from 0 to (MAX_NUM_TEMPS – 1). Suggested name: temperatures or temps.A variable of type Integer that stores the actual number of temperatures stored in the array. Based on this value, you can find the location of the next empty element in the array (and, similarly, the last element used). Suggested name: numTemps.You will use these throughout your program.Add buttonWhen the Add button is clicked, the following actions should occur:If newTempTextBox is not empty (i.e., its text is not equal to String.Empty), then:Store the contents of newTempTextBox (converted to a number) into a variable.Store this value into the next empty element of your temperatures array and into a new item in tempsListBox.Add 1 to numTemps.If the maximum number of temperatures has been read, then disable newTempTextBox and addButton (by changing their Enabled properties).Find Coldest buttonWhen the Find Coldest button is clicked, your program should search the temperatures array for the coldest (i.e., lowest) temperature. Use MessageBox.Show to display the coldest temperature. The MessageBox should look similar to the following:MessageBox with message ‘The coldest temperature is 17 degrees’, title ‘Coldest Temperature’, Information icon, and OK button.Note that some array elements may not contain data yet. Because we only want to consider valid temperatures, not meaningless zeroes (0’s), do not use a For Each-Next loop for this button. Use a standard For-Next loop instead. In the loop, count up to the number of temperatures entered (numTemps – 1), not the loop’s upper bound.The findSmallestButton_Click method on page 256 of your textbook is a good example of how to do this. However, do not simply copy and paste that code! Adapt it to fit what you need to do here.Find Warmest buttonWhen the Find Warmest button is clicked, your program should search the temperatures array for the warmest (i.e., highest) temperature. Use MessageBox.Show to display the warmest temperature.This method should be very similar to your method for the Find Coldest button. The MessageBox used to show the result should be the same, except you should write ‘warmest’ instead of ‘coldest’. Once again, use a standard For-Next loop, not a For Each-Next loop. In the loop, count up to the number of temperatures entered (numTemps – 1), not the loop’s upper bound.Find Average buttonWhen the Find Average button is clicked, first check whether any temperatures have been entered (to avoid dividing by zero). If no temperatures were entered, show the following MessageBox and do nothing else in this method:A MessageBox. Message: ‘No temperatures entered yet!’. Title: ‘Error’. Buttons: OK. Icon: Error.Otherwise, your program should add up all temperatures stored in the array, then divide by the number of temperatures entered to find the average. Display the average in a MessageBox similar to the one for the Find Coldest and Find Warmest buttons.Use a For Each-Next loop to add the temperatures. In this method, the unused array elements have the value 0, so they have no effect on the average.Clear All buttonWhen the Clear All button is clicked:Reset every element of the temperatures array to 0 (using a For Each-Next loop).Reset the numTemps counter variable to 0.Clear all items from the list box.Enable newTempTextBox and the AddButton, if needed.

Looking for this or a Similar Assignment? Click below to Place your Order

Open chat