DIT504  APPLICATION PROGRAMMING .

UNIVERSITY EXAMINATIONS: 2017/2018
EXAMINATION FOR THE DIPLOMA IN INFORMATION
TECHNOLOGY
DIT504 APPLICATION PROGRAMMING
FULLTIME/PARTIME
DATE: APRIL, 2018 TIME: 1 ½ HOURS
INSTRUCTIONS: Answer any THREE questions.

QUESTION ONE
a) The following is VB program extracted from a student’s project. Study the code and
answer the questions below.
Public Class Form6
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim NationalID As Decimal
Dim Firstname As Char
Dim PersonAge As Integer
NationalID = IDTextBox.Text
Firstname = NameTextBox.Text
PersonAge = AgeTextBox.Text

End Sub
End Class
Identify the following:
i. Two variables [2 Mark]
ii. Two operators [2 Mark]
iii. Two objects [2 Mark]
iv. Two data types [2 Mark]
b) Give any two uses of a textbox control. [2 Marks]
c) Define the term concatenation as used in VB coding system. [1 Mark]
d) List two techniques used to organize if statement program logic. [2 Marks]
e) Describe any three rules that must be followed when writing the If statement.
[3 Marks]
f) A DataGridView is one of the controls used in VB applications. Describe how the
control is used in a VB application. [2 Marks]
g) List any two database products. [2 Marks]
QUESTION TWO
a) Explain FOUR controls used in visual Basic and state their functions [8 Marks]
b) Write a code of a program that uses a loop to generate numbers between 10 and 50 and then the
program computes the sum of the numbers [6 Marks]
c) Using the Do While loop write a program that displays a number, its square and its cube for the
numbers between 1 and 10 [6 Marks]
QUESTION THREE
a) Distinguish between a selection control and a loop control structure [4 Marks]
b) Outline FOUR characteristics of a good algorithm [4 Marks]
c) Explain any THREE advantages of using functions in a program [3 Marks]
d) Populate the steps followed when linking a project to Database [7 Marks]
e) Explain the term debugging [2 Marks]
QUESTION FOUR
a) State the advantages of using comments when programming. [2 Marks]
b) Explain the following terms as used in vb.net programming
a. Common Language Runtime [CLR]
b. Event
c. Object
d. Method [4 Marks]
c) Using examples in each case, differentiate between record and a fieldname.
[2 Marks]
d) List any three VB variables. [3 Marks]
e) Write a VB Program that captures two values (Value 1 and Value 2) respectively. The
program should compute the difference between Value 1 and Value 2. [3 Marks]
f) Write a VB Program that captures two values (Value1, Value 2 and Value 3)
respectively. The program should compute the total of Value 1 and Value 2 multiplied by
the value 3. [3 Marks]
g) Give the output of the following string concatenations.
i). “10” & “00”
ii). “20” & ” ” & “20”
iii) “20” & ControlChars.NewLine & “20” [3 Marks]
QUESTION FIVE
a) Explain the logic “If Statement” as used in VB Programming. [2 Mark]
b) Describe THREE data operators supported by VB.net [6 Marks]
c) Write a Pseudo code and a flow chart based on the following scenario below. [5 Marks]
“James tends to go golfing, mow the grass or sit on the porch when the weather
becomes warm but often chooses to drink a hot cup of tea or read a book when the
weather isn’t warm enough.”
d) Write a VB Program that captures the student names, Marks for Assignment one and
Assignment two. If Assignment one is greater than or equal to 15 and Assignment two is
greater than or equal to 20, then the program should display the total of Assignment one and
Assignment two. Else if assignment one is less than or equal to 14 and assignment two is less
than or equal to 19 then the program should display the message “The student has a
Supplementary”. [5 Marks]
e) Describe any two types of tables in a database implementation. [2 Marks]

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

Written by