0% found this document useful (0 votes)
3 views

Inte 211 - Desktop Application Programming

This document outlines the examination details for the course INTE 211: Desktop Application Programming at Kabarak University for the 2017/2018 academic year. It includes instructions for candidates, a series of questions covering topics such as event-driven programming, Visual Basic IDE components, ADO objects, error types in Visual Basic, and programming tasks. The exam consists of five questions, with specific marks allocated to each part.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Inte 211 - Desktop Application Programming

This document outlines the examination details for the course INTE 211: Desktop Application Programming at Kabarak University for the 2017/2018 academic year. It includes instructions for candidates, a series of questions covering topics such as event-driven programming, Visual Basic IDE components, ADO objects, error types in Visual Basic, and programming tasks. The exam consists of five questions, with specific marks allocated to each part.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

KABARAK UNIVERSITY

UNIVERSITY EXAMINATIONS
MAIN CAMPUS

THIRD SEMESTER, 2017/2018 ACADEMIC YEAR

EXAMINATION FOR THE DEGREE OF SCIENCE IN INFORMATION


TECHNOLOGY

INTE 211: DESKTOP APPLICATION PROGRAMMING

STREAM: [Y2S2] TIME: 2.00-4.00PM


EXAMINATION SESSION: AUGUST DATE: 9/8/2018
INSTRUCTIONS

 Instructions to candidates: Answer QUESTION ONE and any other TWO questions
 Do not write on the answer sheet
 Follow instructions that are given to the answer sheet

QUESTION 1 (30 MARKS)

a) What is an event-driven programming language? (4 marks)

b) Explain the following components available in the Visual Basic IDE:

i) Project explorer (4 marks)


As members of Kabarak University family, we purpose at all times and in all places, to set apart in
one’s heart, Jesus as Lord. (1 Peter 3:15)

Page 1 of 4
ii) Project properties (4 marks)

iii) Object browser (4 marks)

c) What is OLE used for? (4 marks)

d) What are ADO objects? Explain them. Provide a scenario using three of them to return data
from a database. (10 marks)

QUESTION 2 (20 MARKS)

a) Consider the following variables:

Contents Data Type Reason

Employee NHIF number ________ _______

employeePay rate ________ _______

Hours worked ________ _______

Address ________ _______

Age ________ ________

Required:

Suggest the probable data type and give a reason for your suggestion. (5 marks)

b) Using appropriate syntax explain the following iterative statements as used in VB.

i. if…else statements (3 marks)

ii. for statement (3 marks)

c) Briefly explain the following controls to distinguish among them.

As members of Kabarak University family, we purpose at all times and in all places, to set apart in
one’s heart, Jesus as Lord. (1 Peter 3:15)

Page 2 of 4
i. Radio button and checkbox (3 marks)

ii. Combo box and List box (3 marks)

iii. Command button and timer control (3 marks)

QUESTION 3 (20 MARKS)

a) Explain three types of errors commonly encountered in Visual Basic programming.


(6 marks)

b) Write a Visual Basic program to compute frequency and area using the following
formulas.

i. (5 marks)

ii. (5 marks)

c) Write the result of each of the following: (4 marks)

i) For i = 1 To 7 ii) For i = 1 To 7 Step 2


ii) For i = 1 To 7 Step -1 iv) For i = 1 To 7 Step -2

QUESTION 4 (20 MARKS)

a) Consider the Visual Basic program below & answer the questions that follow
Private sub cmdCompute_Click ()
Dim x As Integer
X=1
Do While x=<10
If x<6 And x<>2
Print x*3
X=x+1
Loop
End Sub
Write down the output produced by this program (4 marks)

As members of Kabarak University family, we purpose at all times and in all places, to set apart in
one’s heart, Jesus as Lord. (1 Peter 3:15)

Page 3 of 4
b) Explain briefly the TWO main types of constants found in Visual Basic (4 marks)
c) Write a program that will return the sum of all odd numbers between 1 and 100
(4 marks)
d) Explain the THREE steps involved in creating a VB6 program (6 marks)

e) Write code using Visual Studio 2013 to change the background color of a form to
Yellow (2 marks)

QUESTION 5 (20 MARKS)

a) Discuss the scope of variables. (6 marks)

b) Explain the various technologies applied in database linking. (6 marks)

c) Using the Do----While loop write a program to print the decimal numbers 1-9 on the
form. Make use of print command (6 marks)

d) What is the use of Option explicit in Visual Basic? (2 marks)

As members of Kabarak University family, we purpose at all times and in all places, to set apart in
one’s heart, Jesus as Lord. (1 Peter 3:15)

Page 4 of 4

You might also like