DBIT 504 APPLICATION PROGRAMMING.

UNIVERSITY EXAMINATIONS: 2016/2017
SUPPLEMENTARY EXAMINATION FOR THE DIPLOMA IN BUSINESS
INFORMATION TECHNOLOGY
DBIT 504 APPLICATION PROGRAMMING
DATE: AUGUST, 2017 TIME: 1½HOURS.

QUESTION ONE
a) Define the following terms as used in programming and support your answer with examples.
[8 Marks]
i. Method
ii. Variable
iii. Comments
iv. Event driven programming
b) Write one line of code to perform the following tasks in VB. [4 Marks]
i. Display the text “Programming is great” on a label lbTrial
ii. To clear text form a text box txttrial
iii. Add items “apple”,”Mangoe”,”Orange”, to a combobox cbotrial
iv. Put the insertion cursor on the first textbox; txttrial
c) State the syntax of the functions msgbox[] and inputbox[] [2 Marks]
d) Differentiate between the following looping constructs [give general syntax of each]; „while
… loop‟ and „do… while loop‟. [4 Marks]
e) One of the qualities of a good program is readability. As a result, there are a number of
techniques employed by programmers to ensure that programs are readable. Discuss any
TWO of them. [2 Marks]
QUESTION TWO
a) Differentiate between a sub procedure and a function [4 Marks]
b) Write a windows application to accept inputs for the dimensions of a rectangle through the
input box function and then compute the area and perimeter of the rectangle. The Area and
Perimeter should be displayed through a Message Box
[2 Marks]
c) Explain the term debugging [2 Marks]
d) Describe the Visual studio IDE environment and list FIVE components on this window.
[6 Marks]
e) Giving examples, identify and discuss THREE types of programming errors. [6 Marks]
QUESTION THREE
a) Write a program to calculate the sum of the first SIX positive integers using the Do while loop
[6 Marks]
b) Rewrite the above code using the For..Next loop . [3 Marks]
c) Explain the meaning of the following Visual Basic code. [2 Marks]
Dim Test[5] as Integer ReDim Test[15] as Integer
d) Explain THREE types of errors encountered during program development [6 Marks]
e) Write pseudo code for a program to calculate the sum of ten numbers provided by a user
[3 Marks]
QUESTION FOUR
a) Distinguish between a selection control and a loop control structure. [4 Marks]
b) Outline FOUR characteristics of a good algorithm [4 Marks]
c) Briefly explain any THREE advantages of using functions in a program
[6 Marks]
d) Using examples, Explain any THREE fundamental data types supported by the VB language.
[6 Marks]

(Visited 124 times, 1 visits today)
Share this:

Written by