Instructions: For Form_Load display, use a textbox and check its “multiline” checkbox. To display data on Form_Load, use a txtOutput.AppendText() method (i.e. NOT a listbox control). 1. Declare a global array “temp()” and populate it with data from a “Data” file (in bin/Debug) 2. Declare a global array “numbers1()” and set its upperbound to temp() 3. In Form_Load: a) Convert temp() as String to numbers1() as Double: Use For Next loop b) Create numbers2() and populate it with numbers1(): Use For Next loop c) Create numbers3() and populate it with numbers2(): Use For Next loop d) Sort numbers2() in ascending order. USE ARRAY SORT METHOD e) Sort numbers3() in descending order. USE ARRAY REVERSE METHOD f) Display column headers: “ArrayIndex” “fromFile” “Ascending” “Descending” g) Display the results 4. Create a Sub called Total to calculate the sum for all numbers in Data file. 5. Inside btnTotal_Click, call the Total Sub 6. Create a Sub called MinMax to determine the largest and smallest numbers in Data file. USE FOR EACH Loop!! 7. Inside btnMinMax_Click, call the MinMax Sub 8. Create a Sub called Average to calculate the average of the numbers in Data file. USE THE “AVERAGE” BUILT-IN SYSTEM METHOD 9. Inside btnAverage_Click, call the Average Sub

In this assignment, we are tasked with creating a program that displays data from a file on Form_Load and performs certain operations on the data. Let’s go through the steps and requirements outlined in the instructions.

First, we need to create a textbox control and enable its “multiline” checkbox. This will allow us to display multiple lines of text in the textbox.

Next, we need to declare a global array called “temp()” and populate it with data from a file called “Data” located in the bin/Debug directory. It is not specified what type of data is in the file, so we will assume it is a string. We can use the appropriate file IO methods to read the data from the file and store it in the “temp()” array.

Then, we need to declare another global array called “numbers1()” and set its upperbound to match the size of the “temp()” array. This will ensure that the arrays have the same dimensions and we can perform operations on the data.

In the Form_Load event, we are instructed to convert the data in the “temp()” array from string to double and store it in the “numbers1()” array. We can use a For-Next loop to iterate over each element in the arrays and perform the conversion. We will need to use appropriate conversion methods, such as the Double.TryParse method, to handle any errors that may occur during the conversion.

Next, we need to create another array called “numbers2()” and populate it with the values from the “numbers1()” array. Again, we can use a For-Next loop to iterate over the arrays and copy the values.

Similarly, we need to create an array called “numbers3()” and populate it with the values from the “numbers2()” array. We can use a For-Next loop for this as well.

After populating the arrays, we need to sort the “numbers2()” array in ascending order. We can achieve this by using the Array.Sort method.

Similarly, we need to sort the “numbers3()” array in descending order. We can use the Array.Reverse method for this purpose.

Next, we need to display the column headers: “ArrayIndex”, “fromFile”, “Ascending”, and “Descending”. Since the instructions specify using a textbox with multiline enabled, we can use the AppendText method to add the headers to the textbox.

Finally, we need to display the results. This can be done by iterating over the arrays using a For-Next loop and appending each element to the textbox using the AppendText method.

In addition to the above requirements, the instructions also mention creating three subroutines: Total, MinMax, and Average.

In the Total subroutine, we need to calculate the sum of all the numbers in the “Data” file. We can achieve this by iterating over the elements in the “numbers1()” array and adding them together.

In the MinMax subroutine, we need to determine the largest and smallest numbers in the “Data” file using a For-Each loop. We can initialize variables for the largest and smallest numbers and update them as we iterate over the elements in the “numbers1()” array.

In the Average subroutine, we need to calculate the average of the numbers in the “Data” file using the built-in “Average” system method. This method takes an array as input and returns the average value.

Finally, we need to call the Total, MinMax, and Average subroutines in response to corresponding button clicks. We can assign event handlers to the button click events and call the subroutines from there.

I hope this explanation helps you understand the requirements and steps involved in completing this assignment.

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Click Here to Make an Order Click Here to Hire a Writer