DIT 504 APPLICATION PROGRAMMING .

UNIVERSITY EXAMINATIONS: 2016/2017
EXAMINATION FOR THE DIPLOMA IN INFORMATION TECHNOLOGY
DIT 504 APPLICATION PROGRAMMING
DATE: DECEMBER, 2016 TIME: 1 ½ HOURS
INSTRUCTIONS: Answer any THREE questions.

QUESTION ONE
a) Explain the following terms as used in vb.net programming.
(i) Console application.
(ii) Class Libraries
(iii) Common Language Runtime [CLR]
(iv) Event
(v) Object @2Marks each [10 Marks]
b) Name and discuss any five components/windows in the visual studio integrated development
environment [5 Marks]
c) Write a program that can pass variable as a function argument in vb.net [5 Marks]
QUESTION TWO
a) Define the following terms
(i) Data type
(ii) variable
(iii) Constant [6 Marks]
b) Given the form below, write a program to add items to the list box [4 Marks]


c) Using appropriate examples, distinguish single dimensional arrays from multi dimensional arrays
[5 Marks]
d) Write a simple windows application program that uses an array structure to store 10 integer
numbers entered though the keyboard, the program should compute the sum and mean of the
numbers stored and display the results on a label named lblsum and lblmean respectively. sketch the
GUI. [5 Marks]
QUESTION THREE
a) Using appropriate code examples discuss any THREE looping mechanisms [6 Marks]
b) Explain the concept of objects and classes as used in VB.net application. [4 Marks]
c) Using the correct syntax, explain the difference between input box and message box function.
[4 Marks]
d) Write a program to calculate the sum of the first 5 positive integers using the Do while loop.
[4 Marks]
e) Rewrite the above code using the For…Next loop. [2 Marks]
QUESTION FOUR
a) The Data Provider is responsible for providing and maintaining the connection to the database.
Each DataProvider consists of the component classes: List the component classes [4 Marks]

b) Write a vb.net program to accept length and width of a rectangle as the input from the user in order
to compute the area and perimeter of the rectangle. [4 Marks]
c) Give TWO advantages of using select..Case [2 Marks]
d) Write some simple code that can display a grade in a message box, given the Marks through a
textbox txtTest, using the following grading system. Use Select..Case.
Marks Grade
0 – 49 Fail
50 – 64 Pass
65 – 74 Credit
75 – 100 Distinction
Any other Invalid [6 Marks]
e) Write a program that reads in a number through a text box. If the number is greater than five it
displays the cube of the number, else it displays the square of the number [4 Marks]
QUESTION FIVE
a) Describe the FOUR levels of variable scope in VB [8 Marks]
b) With examples, explain the use of the following common VB controls [12 Marks]
(i) TextBox
(ii) MaskedTextBox Control
(iii) A GroupBox control
(iv) RichTextBox Control
(v) CheckBox control
(vi) PictureBox Control

(Visited 80 times, 1 visits today)
Share this:

Written by