0% found this document useful (0 votes)
17 views3 pages

Application Programming Past Paper 2

Uploaded by

Higgins Otieno
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)
17 views3 pages

Application Programming Past Paper 2

Uploaded by

Higgins Otieno
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

UNIVERSITY EXAMINATIONS: 2023/2024

EXAMINATIONS FOR THE DIPLOMA IN TECHNOLOGY


DIT 504: APPLICATION PROGRAMMING
FULL TIME / PART TIME
ORDINARY EXAMINATION
DATE: AUGUST, 2024 TIME: 2 HOURS
INSTRUCTIONS: Question One is Compulsory, Choose Two Other Questions

QUESTION ONE (20 marks) Compulsory

a. Differentiate between a list box and a combo box. (1marks)


b. Define the VB intelligence. (1 marks)
c. Explain why you would prefer it for typing code to an ordinary text editor. (2 marks)
d. Briefly explain the importance of comments in a program. (1 marks)
e. Define Menus as used in [Link]. (2 marks)
f. Explain why you would prefer menus to command buttons in your application. (2 marks)
g. Differentiate between list box, checked Listbox and combo box as used in [Link].
(1 marks)
h. A company needs to quickly compute the value of any item in inventory. Build a form that will
enable inputting values into three textboxes:
• Product description,
• Quantity on hand, and
• Product cost.
Clicking a Compute button should display the total value of the inventory product to an output
textbox. Clicking a Reset button will reset the form. Clicking an Exit button will close the
form. Set Option Strict On. (6 marks)

i. Discuss four types of connection to database across networks that are offered by [Link]
(4 marks)
QUESTION TW0 (15 marks)
a. List any 2 objects and 2events used in VB and explain their functions. (4 marks)
b. Analyze this coding segment and determine which message box will display. (2 marks)
Name1String = "Justin"
Name2String = "Jullien"
If Name1String > nameString2 Then
[Link]("Name: " & Name1String & " is bigger")
Else [Link]("Name: " & Name2String & " is bigger")
End If .

c. In Visual [Link], there are 2 types of constants. Describe them using examples (2 marks)
d. Describe the quickest way to reset the VB IDE layout (1mark)
e. Describe the VB's Intelligence feature and explain how its accessed (2 marks)
f. Differentiate between a Text Box and a Masked Text Box (2 marks)
g. Differentiate between the following controls (2 marks)
i) Masked textbox and richtextbox control
ii) Option strict and option explicit

QUESTION THREE (15 marks)


a. Describe three different ways of declaring variables in VB. (3 marks)
b. List any 3 objects and 3 events used in VB and explain their functions. (3 marks)
c. List and briefly describe 4 flow control constructs supported by Visual Basic. (4 marks)
d. Design an interface to calculate the area a trapezium and write the program to produce the area in a
designated textbox (5 marks)

QUESTION FOUR (15 marks)


Describe components of IDE in visual basic. (3 marks)
a. Differentiate the following terms as used in [Link]
i. Textbox and masked textbox (1 Marks)
ii. Checkbox and Radiobutton (1 Marks)
iii. Intelligence and VB code window (1 Marks)
iv. A solution and a project (1 marks)
b. Define menuStrips (1 marks)
c. List objects that can be added to menu strips (2 marks)
d. Define the following (2 marks)
• database
• table
Define the following terms and clearly show how they are declared and initialized: (3 marks)
i) Variable ii)
ii) Constant iii)
iii) Array

You might also like