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

Advanced Application Programming Question Paper

Advanced Application Programming 

Course:Bachelor Of Science In Information Technology

Institution: Masinde Muliro University Of Science And Technology question papers

Exam Year:2010



EXAMINATION FOR THE DEGREE OF BACHELOR OF
SCIENCE IN INFORMATION TECHNOLOGY
BIT 4202: ADVANCED APPLICATION PROGRAMMING
DATE: APRIL 2010 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? [2 Marks]
ii. Suppose the keypress event sets keyAscii to 0, what would be the effect? [2 Marks]
b)
i. Class modules have two built-in events. Which are they and when do they occur?
[4 Marks]
ii. Explain how a method of an object can be created [3 Marks]
c) Explain the components of client server architecture. [3 Marks]
d)
i. Explain two differences between general procedure and functions in visual basic [4 Marks]
ii. The time required to call a procedure depends on two factors. Explain. [4 Marks]
e) Consider random access to a file test.dat. Write some code segments to achieve
the following.
i. Open the file and write to it some line of text [4 Marks]
ii. Open the file and read information from it [4 Marks]
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 he 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
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]
c) What role does visual basic play in client server architecture? [2Marks]
QUESTION FOUR
a) List and explain any two application programming interfaces (APIs) and any two database object interfaces [6Marks]
b) Write some code that would achieve the following in creating an activex control from a
command button
i. Create two events; click() and mousedown() where mousedown() has four arguments:
button and shift as integers , x and y as single [3Marks]
ii. Assign to caption property of the control the caption of the command button [4Marks]
iii. Raise the two events [3Marks]
iv. Resize the button to be the size the developer draws the control to. [3Marks]
v. Set the control name as the initial caption [1Mark]
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


Popular Exams


Mid Term Exams

End Term 1 Exams

End Term 3 Exams

Opener Exams

Full Set Exams



Return to Question Papers