BIT 2105  APPLICATION PROGRAMMING KCA Past Paper

UNIVERSITY EXAMINATIONS: 2010/2011
SECOND YEAR EXAMINATION FOR THE DEGREE OF BACHELOR OF
SCIENCE IN INFORMATION TECHNOLOGY
BIT 2105: APPLICATION PROGRAMMING
DATE: AUGUST 2011 TIME: 2 HOURS
INSTRUCTIONS: Answer question ONE and any other TWO questions

Question One
a) Describe the steps followed when creating an application inVB (6 Marks)
b) In Visual Basic, there are 2 types of procedures. Describe them using examples (6 Marks)
c) Visual Basic stores code in 3 kinds of modules: describe each one of them using examples to
illustrate. (9 Marks)


Study the following Diagram and answer question that follow
Name the above VB IDE windows from left to right describing each one of them according in tabular
form. The first one has been done for you


(9 Marks)
Question Two (20 marks)
a) Explain how procedures are named in VB, using an example (6 Marks)
b) Describe the default Visual Basic statements’ colors (6 Marks)
c) It is important to produce an executable file from any project you complete. Citing advantages
explain why this statement is true. (8 Marks)
Question Three (20 marks)
a) Write a program that uses a function to calculate the sum of two numbers and display their sum
using a label control (8 Marks)
b) Briefly describe any three advantages of using sub procedures or functions in a program.
(6 Marks)
c) Describe three different ways of declaring variables in VB (6 Marks)
Question Four (20 marks)
a) i) Differentiate between native code compilation and p-code compilation in VB (4 Marks)
ii) Describe situations where each of the compilation methods above is suitable 8mks
b) Describe 4 flow control constructs supported by Visual Basic. (4 Marks)
c) Explain the following events stating one possible use for each.
i) Form Load
ii) KeyPress (4 Marks)
Question Five (20 marks)
(a) An object in Visual Basic is said to possess three aspects namely: properties, methods and
events. Using a Balloon example, discuss the three aspects. (6 Marks)
(b) Write one line of code to perform the following tasks:-
(i) Select an optionButton called optMale
(ii) Display the message “This is Visual Basic” in a label called lblTest
(iii) Displaying the message “My Name is John” in a Message Box
(iv) Adding an Item “Programing” to a Combo cboTest
(v) Setting focus in a text box txtCourses
(10 Marks)
(c) Discuss any THREE debugging facilities used in Visual Basic, and state how they are used.
(6 Marks)

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

Written by