BIT 2105 APPLICATION PROGRAMMING KCA Past Paper

UNIVERSITY EXAMINATIONS: 2012/2013
SECOND YEAR EXAMINATION FOR THE BACHELOR OF
SCIENCE IN INFORMATION TECHNOLOGY
BIT 2105 APPLICATION PROGRAMMING
DATE: DECEMBER, 2012 TIME: 2 HOURS
INSTRUCTIONS: Answer Question ONE and any other TWO

QUESTION ONE
a) Explain the following terms as used in VB (5 Marks)
i. Items collections
ii. Solutions
iii. Namespace
iv. Masked text box
v. Rich text box
b) i. Explain the use of combo boxes and list boxes in application development
(4 Marks)
ii. Write code using VB.NET that demonstrates how to access the Text
Property of a combo box and pass it to a variable, then display it to the
screen (6 Marks)
c) Explain the following numeric constants declarations
i. 40.45D
ii. 12576.877R
iii. 47852I
iv. 9888444222L
v. 2588S
vi. 0.0725F
(6 Marks)
d) Differentiate between a hot key and a short cut key as used in VB. (4 Marks)
e) Describe the Input-Process-Output model for programming using VB to illustrate
(5 Marks)
QUESTION TWO
a) Describe the three components of the VB IDE, (6 Marks)
b) List any 3 objects and 3 events used in VB and explain their functions. (6 Marks)
c) List and briefly describe 4 flow control constructs supported by Visual Basic.
(8 Marks)
QUESTION THREE
a) Describe using examples the four levels of variables scope in VB. (6 Marks)
b) Explain what is accomplished by the code statements below
PriceDecimal = Decimal.Parse(PriceTextBox.Text,
Globalization.NumberStyles.Currency)
(6 Marks)
c) Discuss two ways of calling an Event Sub Procedure from a Menu Click Event.
(8 Marks)
QUESTION FOUR
a) Write a programme that tests if a person is a) A teenager, b) in their twenties, c) in
their thirties, or d) none of the above. (9 Marks)
b) Differentiate between procedural and event driven programming (4 Marks)
c) Describe two types of general procedures in VB (7 Marks)
QUESTION FIVE
a) Compare and contrast option buttons and checkboxes as used in Visual Basic.
(4 Marks)
b) Briefly explain the importance of comments in a program. (4 Marks)
c) Briefly describe any TWO advantages of using sub procedures or functions in a
program. (4 Marks)
d) Write a program that accepts money in US dollars through an Input Box function
and converts it to Kenya Shillings.. The program should output the Kenya Shilling
value through a Message Box function upon the click of a command button. (1 US
Dollar = 76 Kshs) (8 Marks)

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

Written by