Advanced Application Programming Question Paper

Advanced Application Programming 

Course:Bachelor Of Science In Information Technology

Institution: Kca University question papers

Exam Year:2009



UNIVERSITY EXAMINATIONS: 2008/2009
THIRD YEAR EXAMINATION FOR THE DEGREE OF BACHELOR OF
SCIENCE IN INFORMATION TECHNOLOGY
BIT 4202: ADVANCED APPLICATION PROGRAMMING
DATE: AUGUST 2009 TIME: 2 HOURS
INSTRUCTIONS: Answer question ONE and any other TWO questions
QUESTION ONE
a) Consider the following two keypress event procedures in the same form module
Private Sub Form_KeyPress(KeyAscii As Integer)
MsgBox "KeyPress event for the form."
End Sub
and
Private Sub txtOrganizationNumber_KeyPress(KeyAscii As Integer)
MsgBox "KeyPress event for the textbox."
End Sub
i. What should be done to make the first procedure execute first? [2Marks]
ii. Suppose the keypress event sets keyAscii to 0, what would be the effect? [2Marks]
b)
i. Class modules have two built-in events. Which are they and when do they occur? [4Marks]
ii. Explain how a method of an object can be created [3Marks]
c)
i. What role does visual basic play in client server architecture? [2Marks]
2
ii. Explain the components of client server architecture. [3Marks]
d)
i. Explain two differences between general procedure and functions in visual basic [4Marks]
ii. The time required to call a procedure depends on two factors. Explain. [4Marks]
e) Based on variable scope, variables in visual basic can be grouped into three. Explain [6Marks]
QUESTION TWO
a) Write some code segment to establish a new connection and to open an access
database”studentdetails.mdb” in a folder called “myproject”. The code to also open a table
“student” from the database [8Marks]
b) Assuming the table above has the fields; studentid, surname and firstname, write some code that
would use the find method to make a record current, enable editing of the current record, update
the database and destroy the ADO objects on unloading the form. [12 Marks]
QUESTION THREE
a) Give the syntax of opening a sequential file in visual basic [3Marks]
b) Write some code segment to achieve the following assuming sequential access to the file. Use
visual basic.
i. Open a text file myfile, contained in the folder fireflies in drive C for output and write
some two lines of text into it. [3Marks]
ii. Open the file above for append and write a line of text into it [3Marks]
iii. Read information from the file above [3Marks]
c) Define the term binding as used in visual basic. Explain the two types of binding in visual basic
[6Marks]
QUESTION FOUR
a) i. List and explain any two application programming interfaces (API)
ii. List and explain any two database object interfaces
[6Marks]
b) Consider random access to a file test.dat. Write some code segments to achieve
the following in visual basic.
i. Open the file and write to it some line of text [4Marks]
ii. Save the text back to the disk [3Marks]
3
iii. Open the file and read information from it [ 4Marks]
iv. Close the file [3Marks]
QUESTION FIVE
a) Describe how to create a class module in visual basic [3Marks]
b) Using some code segment, illustrate how properties of a class module are created [6Marks]
c) Illustrate how forms can be used as properties of a class. Use some code for illustration.
[5Marks]
d) Illustrate how an enumeration can be created to be used as the data type with a class module
property variable and procedures [6Marks]






More Question Papers


Exams With Marking Schemes

Popular Exams


Mid Term Exams

End Term 1 Exams

End Term 3 Exams

Opener Exams

Full Set Exams



Return to Question Papers