Get premium membership and access revision papers, questions with answers as well as video lessons.

Event Driven Programming Question Paper

Event Driven Programming 

Course:Diploma In Information Technology

Institution: Kca University question papers

Exam Year:2009



UNIVERSITY EXAMINATIONS: 2009/2010
STAGE V EXAMINATION FOR DIPLOMA IN INFORMATION
TECHNOLOGY
DIT 504: EVENT DRIVEN PROGRAMMING
DATE: NOVEMBER 2009 TIME: 1½HOURS
QUESTION ONE [20 MARKS]
a) Differentiate between the following terms as used in visual basic 6.0
i. Property and Method
ii. IDE and Form designer
iii. Variable and constant
iv. Program and Project [8 Marks]
b) Visual basic application may operate in three modes. Explain these modes.
[6 Marks]
c) Write codes to calculate the area of a rectangle when the length & width are
passed to the function. The function returns area of the rectangle [5 Marks]
d) Sketch the GUI [1 mark]
QUESTION TWO [20 MARKS]
a) Write a single line of code to achieve the following
i. Makes use of a function to assign a variable the current system [2 Marks]
ii. Displays the time in a label following the format “hh:mm:ss” [2 Marks]
b) Visual basic code may comprise of a number of elements. Enumerate on these.
[6 Marks]
c) Write a visual basic application that computes total savings based on monthly
deposits made into a saving account. These savings are calculated using the
following mathematical formulae F = D [(1+ I) M-10] i. Where F is the final total
amount, D is the monthly deposit, i is the monthly interest rate and M is the
2
number of months. Your program should allow a user to enter the values. All
these values and display the result in a label. Hint: follow stages of program
development in vb. [10 Marks]
QUESTION THREE [20 MARKS]
a) Explain the difference between general procedures and event procedures.
[3 Marks]
b) Describe two ways in which a message box may be used in VB program
[4 Marks]
c) Write a single VB line of code that will achieve the following effect.
[3 Marks]
d) Discuss any five different types of files that are in cooperated in a VB project.
[5 Marks]
e) Discuss the use of the following functions in VB
i. Format
ii. Val
iii. Ucase
iv. Str
v.Len [5 Marks]
QUESTION FOUR [20 MARKS]
a) List the steps you would follow to set a start-up form for an application[2 Marks]
b) An application has five forms each of these forms has three text boxes that require
the user of the application to key in data. Assuming that these controls have the
same names, write a simple custom subroutine called clear that you can call to
place this subroutine supporting your answer with a reason. [6 Marks]
c) Differentiate between SDI and MDI as used in VB [2 Marks]
d) Discuss three features that the visual basic code editor comes with that assist in
program debugging [6 Marks]
3
e) List the steps you would follow to convert your visual basic project into an
executable file (.EXE) [4 Marks]
QUESTION FIVE [20 MARKS]
a) Write code that would generate the Stage V units (subjects) displayed in lstStage
V. Also ensure that the entry “Event Driven Programming” is highlighted when
the form loads. [4 Marks]
b) Append code to control captioned Add such that when the user clicks an item
inside thelistbox, it displays in txtTransfer. [3 Marks]
c) Write code such that when a user clicks the control captioned delete, the text
displayed in txtTransfer is erased and moved to txtedit, leaving txtTransfer blank.
[3 Marks]
d) Write code to ensure that the control captioned B, U and I are able to format the
text in txtedit to Bold, Underlined and Italics respectively. [3 Marks]
e) Append code to control captioned close [1 Mark]
f) Using examples in each case, explain the use of the THREE control structures
[6 Marks]
4






More Question Papers


Popular Exams



Return to Question Papers