Unity University Department of Computer Science Windows Programming-Assignment I
Unity University Department of Computer Science Windows Programming-Assignment I
Unity University Department of Computer Science Windows Programming-Assignment I
Windows Programming-Assignment I
Short answer
1 declare an array of ten single precision data type (use both method )
_____________________________________________________________
___________________________________________________
b) what is the index for the last element for the above declaration
_____________________________________________
3 if you declare an array at the top of the form , you can use it throughout the form ( say true or false )
__________________________
_______________________________________________________________
b) if we want the dimension for the above array to be changed(set)to the size of 10 . what vb.net
statement that we should write .
_________________________________
C)use for loop statement and assign a value 6 to each element of array in part b above
____________________________
_____________________________
______________________________
______________________________
Ubound(kk)
___________________________________________ķ
5 consider the following segment of code is written under the click event procedure of BUTTUN 1 .
Predict output in the listbox . When the button is clicked
Array.sort(gg)
Dim i AS short
LstList.item.add(gg )
Next
_________________
Programming excercise
1. Write a vb.net program that find the median value for a given list of numbers
● When “enter data” button is clicked, then the program immediately request how many
Numbers are in the list. Then it stores all numbers in the list in an array using input function
● When “median “ button is clicked ,then the program display all the numbers in the list
followed by the median value as follow
Sample data for even number of element
2. Write a program that find the standard deviation temperature for a given number of days.
● Temperatures for the number of days are accepted using inputbox function . after accepting
the number of days for the calculation (use dynamic array to store the temperatures for the
number of days)
● Finally, an output will be displayed using textbox like we see on the example in the array
● Standard deviation for set of data is calculated
● To enter data using inputbox, then click enter temperatures button
● When display temperatures button is clicked , then the output is displayed as follow.
Sample data