SIT 103 Visual Programming 105524
SIT 103 Visual Programming 105524
DURATION: 2 HOURS
TIME: 2.00-4.00PM
Instructions to Candidates:
Page 1 of 4
SECTION ONE – ANSWER ALL QUESTIONS IN THIS SECTION
QUESTION ONE
a) With use of suitable examples describe the rules that govern naming of identifiers in a Visual
Basic environment (8 marks)
b) Explain the following Visual Basic IDE components (6 marks)
i. Toolbox
ii. Properties window
iii. Code window
c) i. Outline four characteristics of a visual programming language (4 marks)
ii. Distinguish between a method and property as used in visual programming (2 marks)
d) You are required to write a VB program that enables the user to calculate the sum, product,
division and difference of two numbers entered through text-box controls after a click of
responsive button. The results are displayed in a Text-box control and upon the click of a second
button, the user may clear the text-box controls content ready for next input.
i. Sketch a suitable graphical user interface assigning appropriate property values to your form
and other controls (2 marks)
ii. Write the code for EACH of the buttons, declaring your variables appropriately (8 marks)
QUESTION TWO
a) State the most appropriate VB data type for a variable that stores the following values.
Give a reason for each of your choices. (8 marks)
i. A student registration number
ii. Amount of money paid as fees by a student
iii. Whether a student is male or female
iv. The total number of students enrolled in ALL universities and colleges in Kenya
b) Write an Event Procedure that uses input dialog boxes to accept students scores in CAT,
Assignment and Exam marked out of 20, 10 and 70 respectively. The program calculates the total
Page 2 of 4
score and implements a SELECT CASE Statement to assign a letter grade and Order-of-merit as
shown in the table below (8 marks)
Total Score (%) Letter Grade Order of merit
70 ≤ Score < 100 A Distinction
60 ≤ Score < 70 B Credit I
50 ≤ Score < 60 C Credit II
40 ≤ Score < 50 D Pass
Score < 40 F Fail
QUESTION THREE
QUESTION FOUR
a) With respect to visual programming explain the terms Event and Event Driven Programming
(4 marks)
b) With use of Truth-tables elaborate the following logical operators (8 marks)
i. AND
ii. OR
iii. NOT
iv. XOR
Page 3 of 4
c) Write a single VB statement that would trigger the pop-up dialog box shown below (6 marks)
i) Cost Input Form x ii) Feedback Message x
Page 4 of 4