Scs 053: Visual Programming Question Paper
Scs 053: Visual Programming
Course:Diploma In Information Technology
Institution: Muranga University Of Technology question papers
Exam Year:2018
QUESTION ONE
a) State four features of Visual Basic (4 marks)
b) With aid of an example show how constants are declared in Visual Basic (2 marks)
c) Differentiate between public variable and local variable (4 marks)
d) There are four save commands available under the file menu in Visual Basic. Explain the use of these commands (8 marks)
e) Variables are used by Visual Basic to hold information needed by your application. State four rules used in naming variables (4 marks)
f) Write a code in command button to exit a running program when clicked (2 marks)
g) Distinguish the following as used in Visual Basic programming language (6 marks)
i. Variant data type and form level variable
ii. Picture Box and Frame (2 marks)
iii. Method and Event (2 marks)
SECTION B – ANSWER ANY TWO QUESTIONS IN THIS SECTION
QUESTION TWO
a) Explain the meaning of the following text box properties (6 marks)
i. SelLength
ii. SelStart
iii. SelText
b) Distinguish between: (6 marks)
i. Label and command button
ii. ListBox and ComboBox
iii. checkbox and Option button
c) Differentiate between Exit for and Exit do (2 marks)
d) Using For … Next loop write a code to display a series of odd numbers between 1 to 100 in a ListBox control. Attach the code to a command click event (6 marks)
QUESTION THREE
a) Write a code to add the following schools in a combo box; Computing, Engineering, Business, Hospitality and Science (6 marks)
b) Write a Visual Basic program that will be able to display different age category in Table 1. Use If … Else statement attach the code to a command click event. The user should input the age using the input box and get the category feedback on the message box (6 marks)
Table 1
Age
Category
0 to 12
This is a child
Between 13 and 19
This is a teenager
Between 20 and 35
This is a special adult
Between 36 and 64
This is a mature adult
Above 65
This is a senior citizen
Any other
Invalid age bracket entered
c) Define array as used in Visual basic programming (2 marks)
d) Distinguish the following:
i. Do while/loop and D/loop While
ii. Message box and Input box
iii. Setfocus and lostfocus (6 marks)
QUESTION FOUR
a) Distinguish between the Str ( ) and Val ( ) functions as used in visual basic programming language
i. Str ( ) -
ii. Val ( ) - (4 marks)
b) Use the Table below to write a program to input marks attained by a student then output grade in a given course unit using select case. Attach the code in a command button click event. The user should input marks in an InputBox and get the grade in the MessageBox (7 marks)
Mark
Grade
0-39-E
40-49-D
50-59-C
60-69-B
70-100-A
c) Explain three modes that visual basic operates in (3 marks)
d) Explaining the function of each of the following components in a visual basic programming language:
i. Project Explorer Window
ii. Toolbox
iii. Object browser (6 marks
Scs 053: Visual Programming question paper
More Question Papers
Exams With Marking Schemes