0% found this document useful (0 votes)
15 views

BIT 214 - Programming II

Uploaded by

Lionel Sasalande
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

BIT 214 - Programming II

Uploaded by

Lionel Sasalande
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Semester Examination Paper 2024

Semester: Two Module: BIT 214


Exam Status: 2nd Quarter Duration: 2 Hours
Lecturer: Mr L.Sasalande Date: 11 December
2024
Moderator: Mr S.Mthethwa Marks: 100
Instructions:
a. Answer all questions on an answer sheet provided.
b. Ensure you label each question’s numbers in order and properly on your
answer sheet.
c. Ensure to provide your full name and your course details on the answer
sheet.

Question 1 – Multiple Choice (16 Marks)


No. 1
The software design technique that increases the extent to which software is
composed of separate, interchangeable components is referred to as
_______________________
a. Encapsulation
b. Modularity
c. Cohesion
d. Coupling

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

©Bradford University College


DEP: INFORMATION TECHNOLOGY
Semester Examination Paper 2024

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.

©Bradford University College


DEP: INFORMATION TECHNOLOGY
Semester Examination Paper 2024

The following five questions will be based on the picture below

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

©Bradford University College


DEP: INFORMATION TECHNOLOGY
Semester Examination Paper 2024

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)

Question 4 – True or False (14 Marks)


a. Dim scores As Integer (10) declares an array of integers.
b. The Close method is used to make a message box disappear.
c. A form has a method named KeyClick that executes when the user presses a
key on the keyboard.

©Bradford University College


DEP: INFORMATION TECHNOLOGY
Semester Examination Paper 2024

d. Full form of IDE is Integrated Development Entity.


e. Every control can have its own unique name.
f. btn is a prefix name used to buttons controls.
g. Me.Close() method minimizes a the current active window.
h. Size is a property value for a class.
i. MessageBox.Show(“Hello World”), the output will be Hello world on TextBox.
j. cmb is a prefix used on combo box controls.
k. Me.Hide() is a short form for the following code:
Me.WindowState=FormWindowState.Minimized
l. Code objects must be created by the programmer and exist solely in a
portion of memory.
m. Examples of control objects are methods, functions and sub-procedures.
n. Form is main interface of an application design.

Question 6 – Matching (20 Marks)


Match the following questions with its related picture letter below. Example:
1–F
1.
MessageBox.Show("Press OK to Delete", "Confirm Delete", _
MessageBoxButtons.OKCancel, MessageBoxIcon.Stop, _
MessageBoxDefaultButton.Button2)
2.
MessageBox.Show("Record has been deleted.", "Customer Records", _
MessageBoxButtons.OK, MessageBoxIcon.Information)
3.
MessageBox.Show("Data entered is invalid. Try Again", "Invalid Data", _
MessageBoxButtons.OK, MessageBoxIcon.Warning)
4.
MessageBox.Show("Are you sure you want to delete the record?", _ "Customer
Records", MessageBoxButtons.YesNo)
5.
MessageBox.Show("This is the text")
6.
MessageBox.Show("This is the text", "This is the caption")

A B
C

©Bradford University College


DEP: INFORMATION TECHNOLOGY
Semester Examination Paper 2024

………………………
D E F

……………………………. End of Examination ………………………………

©Bradford University College


DEP: INFORMATION TECHNOLOGY

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy