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

VB Quiz

vb quiz

Uploaded by

charles
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)
11 views

VB Quiz

vb quiz

Uploaded by

charles
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/ 2

COURSE CODE: SCS 211

COURSE UNIT: VISUAL BASIC PROGRAMMING


EXAM VENUE STREAM: BBA
DATE: AUGUST 2016
TIME :2 HOURS
Instructions
1. Answer question one (compulsory) and any other two questions
2. Candidates are advised not to write on the question paper
3. Candidates must hand in their answer booklets to the invigilator while in the examinations
room
QUESTION ONE (30 MARKS)
a) Define Visual Basic programming language (2marks)
b) Explain the main difference between object oriented and procedural programming
languages (2 marks)
c) Describe the two elements of a Visual Basic Application. (2marks)
d) Explain the difference between the Dim and Global variable declaration (3 marks)
e) Giving examples explain the difference between methods and properties (4marks)
f) Describe the available commands for message box (4marks)
g) Define a V.B statement and explain two types of conditional statements (3marks)
h) Describe the difference between design time and run time in Visual Basic. (4marks)
i) The IDE environment consists of many elements. Describe any SIX elements displayed
when Visual Basic is started (By default) (6marks)
QUESTION TWO (20 MARKS)
a) During a lecture on Visual Basic programming, a lecturer mentioned four reasons for
implementing Visual Basic program as opposed to procedural languages like Pascal or
Basic. Explain the reasons (4marks)
b) A client is curious to know the steps involved in creating a visual basic application.
Advise him on the design steps required (4marks)
c) What is the difference between the Name property and the Text property? (5marks)
d) For the fundamental Object Types given below explain their uses (7marks)
Object Type
i. Label
ii. TextBox
iii. Button
iv. CheckBox
v. RadioButton
vi. ListBox
vii. ComboBox
QUESTION THREE (20 MARKS)
a) The forms and controls support events (generation, interaction with mouse andkeyboard).
Describe any three events for the form object. (3 marks)
b) There are two types of dialog boxes which are input box and messagebox.Describe the
available icons for a message box (4marks)
c) Write a program to add and subtract two integer numbers after putting a suitable design.
Use message box for outputting. (6 marks)
d) The textbox is a box for entering and displaying text (characters or values) in user
project. This tool is used frequently in most of the application. The textbox has
property window, with no caption. Explain why this is so. (2marks
e) Write a programme for a form containing two textbox so that when click on command
button “copy" the text copied from first textbox to the second textbox but in size (28)
(5 marks)
QUESTION FOUR (20MARKS)
a) In Visual Basic program (code) there are four basic parts. Explain these parts to a student
who has just joined the V.B class (4marks)
b) Write a Visual Basic code to clear the contents of a text box (5marks)
c) Describe the four structures of the IF statement (4marks)
d) Write a program to enter a mark of a student then print (pass) in size 18 if he is
successful. (5marks)
QUESTION FIVE (20 MARKS)
a) Data Types are classifications of what sort of data is contained inside of a variable.
Explain any six data types available in V.B (6marks)
b) Describe the general form of counter loop statement. (3marks)
c) Write a program to print (hello) five times (5marks)
d) In a program, statements may be executed sequentially, selectively or iteratively.
Explain the meaning of the following constructs (6marks)
i. Sequential Constructs
ii. Selection Constructs
iii. Iterative Constructs

You might also like