0% found this document useful (0 votes)
24 views4 pages

Sit103 105502

Uploaded by

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

Sit103 105502

Uploaded by

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

MURANG’A UNIVERSITY OF TECHNOLOGY

SCHOOL OF COMPUTING AND INFORMATION


TECHNOLOGY
DEPARTMENT OF INFORMATION TECHNOLOGY

UNIVERSITY ORDINARY EXAMINATION

2020/2021 ACADEMIC YEAR


FIRST YEAR SEMESTER TWO EXAMINATION FOR,
BBIT,BIT,BSE,BSCS&BSCT

UNIT CODE: SIT103

UNIT TITLE: VISUAL PROGRAMMING

DURATION: 2 HOURS

Instructions to candidates:

1. Answer question One and Any Other Two questions.


2. Mobile phones are not allowed in the examination room.
3. You are not allowed to write on this examination question paper.
1
SECTION A: ANSWER ALL QUESTIONS IN THIS SECTION

QUESTION ONE (COMPULSORY) (30 MARKS)

a) Briefly explain the following visual basic IDE components (10 marks)
i. Tool box
ii. Properties window
iii. Project explorer
iv. Form layout
v. Code window
b) Choose the most appropriate VB data type to store the following values. Explain why
your choice is the most appropriate.
i. A student registration number
ii. The amount of money paid as fees by students
iii. The number of students enrolled in a certain college.
iv. The interest rate charged if the account goes overdrawn to an accuracy of two decimal
places.
v. The name of a student.
vi. The number of students enrolled in all the colleges and universities in Kenya.
vii. The date a student was admitted.
viii. Whether a student is a male or not. (4 marks)
c) With the aid of diagrams describe the behaviour and the difference between a Do
while….LOOP and a DO….LOOP UNTI structures. (8marks)
d) Describe a situation under which checkbox controls and radio buttons may be used in an
application program. (4marks)
e) with aid of an example differentiate one dimensional and two dimensional arrays
(4marks)

SECTION B – ANSWER ANY TWO QUESTIONS IN THIS SECTION

QUESTION TWO (20 MARKS)


a) Explain each of the following terms as used in VB.Net environment:
i. Event driven programming
ii. Events
iii. Project
iv. Control
v. Option explicit (10marks)
b) The GUI shown below was designed to capture the present value (pvalue) of a vehicle, the
annual rate(r) of depreciation, the time duration (n) in years from the user and calculates
and displays its future value (fvalue) at the end of the specified time duration. Study it and

2
develop an event procedure that performs the task. The calculation of the depreciation is
based on the reducing balance method whose algebraic expression is
fvalue=pvalue(1-r/100)n. (10marks)

Future value calculator __ X

Present value

Interest Rate per annum

Number of years

Calculate future value

QUESTION THREE (20 MARKS)

a) Explain the following terms with respect to application programming:


i. Call by value
ii. Call by reference (4marks)
b) Analyse the following phrase with respect to the underlined terms:
“VB.Net is both a compiled and an interpreter-event-driven high level language. (8marks)

c) Sometimes an application user may accidentally click the Exit button of an application
and it is therefore wise to provide the application with a facility like the dialog box shown below.
Study it and develop an event procedure of the exit button that triggers the dialog box.
(8marks)
QUIT?

? Do you want to close this form?

YES NO

3
QUESTION FOUR (20 MARKS)
a) With respect to classes and procedures distinguish between a variable scope and a
variable lifetime. (4marks)
b) An elaborate application program is required, it should accept from the user the radius
and height of a solid cylinder via two text-boxes, calculate, and display both the volume and the
total surface area of the cylinder respectively. The output should be via two label controls on
clicking a push-button control.
(Hint: Algebraically v= h and SA= h+ h)
i. Sketch a diagram of an appropriate GUI you would design for this program.(2marks)
ii. Write an event procedure for the click button. (8marks)
c) Describe the ordered steps to follow when creating VB.Net database application
program.(Assume an Ms Access database linking.) (6marks)

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