BIT 214 - Programming II
BIT 214 - Programming II
No. 2
The likelihood a segment of source code that can be used again to add new
functionalities with slight or no modification is known as __________________
a. Modification
b. Reusability
c. Coding
d. Maintenance
No. 3
The first stage of Rapid Application Development (RAD) is ________________
a. Requirement planning
b. Construction
c. User design
d. Implementation
No. 4
The text property of a textbox behaves like a ________________
a. String
b. Numeric
c. Variant
d. Function
No. 5
The code is used in a Sub Procedure to stop execution of a program is
__________________
a. Exit
b. End With
c. End
d. End Sub
No. 6
____________ bar contains a set of tools to provide controls in the Form.
a. Status b. Tool c. Menu d. Progress
No. 7
A ______________ bar appears in the top of the screen.
a. title b. menu c. tool d. debug
No. 8
The ___________ keyword refers to current form in Vb project.
A. me B. current C. form D. case
No. 9
The IDE stands for ____________________.
a. Integer Development Environment.
b. Integrated Development Environment.
c. Information Development Environment
d. Internal Development Environment.
No. 10
In visual basic the declaration of variables is done by __________ key word.
a. int. b. dim. c. else d. declare.
No. 11
Among the events in VB, the Load event is associated with ________________.
a. command button.
b. label.
c. text box.
d. form.
No. 12
What output is displayed when the user enters 30 into the textbox and clicks on the
command button?
a. False printed on the form and 30 > 40 in the textbox
b. True printed on the form and 30 < in the textbox
c. True printed on the form and 30 = 40 in the textbox
d. None of the above
No. 13
What output is displayed when the textbox is left blank and the user clicks on the
command button?
a. A Run-Time error occurs
b. False printed on the form and 0<40 in the textbox
c. True printed on the form and 0>40 in the textbox
d. None of the above
No. 14
What output is displayed when the user enters 60 into the textbox and clicks on the
command button?
a. False printed on the form and 60>40 in the textbox
b. True printed on the form and 60<40 in the textbox
c. A Run-Time error occurs
d. None of the above
No. 15
Which Variable control is declared as an integer datatype in the above code?
a. intUserInput
b. txtNum1.Text
c. X
d. None of the above
No. 16
What is the name of the control that is on the event handler on the source code?
a. cmdValidate_Click()
b. cmdValidate
c. Private Sub cmdValidate_Click()
d. None of the above
Total 16
Question 2 – Structured Questions (50 Marks)
a. Define the following terms: - Variable
- Control
- Method
- Procedure
- Function (10)
b. Name any three programming languages that are under .NET Framework (3)
c. Explain the function of the following code: Me.Hide() (2)
d. List any three properties of a textbox (3)
e. Distinguish between run-time error and syntax error (4)
f. Explain the two main scope of variables? Give their declaration example in
each (6)
g. Give and explain three differences on each between Name property and Text
property in a given control (6)
h. Write a source code that will trigger a MessageBox displayed with “Hello
World” when command button is clicked. (Remember to include an event
handler statement) (8)
i. Based on the previous question, declare a variable named as ‘A’ and initialize
it with a string text as follows: “Hello World”. Then substitute the Hello
World with the declared variable. (8)
A B
C
………………………
D E F