Declare a global array


Declare a global array Solution

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

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: Declare a global array
Reference No:- TGS01122396

Now Priced at $30 (50% Discount)

Recommended (94%)

Rated (4.6/5)