DIT 504 – APPLICATION PROGRAMMING KCA Past Paper

UNIVERSITY EXAMINATIONS: 2021/2022
EXAMINATION FOR THE DIPLOMA IN BUSINESS INFORMATION
TECHNOLOGY/ DIPLOMA IN INFORMATION TECHNOLOGY
DIT 504: APPLICATION PROGRAMMING
DATE: NOVEMBER, 2021 TIME: 2 HOURS
Instructions: Answer ALL questions.

QUESTION ONE (20 Marks)
a) A windows form application is required that captures Marks scored by a student in two
CATS via textboxes, then computes the SUM and outputs the result on a textbox
“txtResult” once a button “Compute Sum” is clicked.
Required:
i. Sketch a suitable design of the Form application using the controls mentioned
above. (3 Marks)
ii. Write a VB Program that captures the two CATs (CAT ONE and CAT TWO)
respectively. The program should compute the sum of both CATs. [3 Marks]
b) Write a VB Program that calculates the area of a rectangle give that the area = length
multiplied by width. [3 Marks]
c) Give two challenges faced by a traditional file based database. (2 Marks)
d) Variables provide a means to store data values that can be used as reference in
computation. For a program to facilitate computation of values, it is important to declare
the variables using a specific data type.
Required:
Explain any THREE fundamental types of data supported by the VB language and give an
example on how variable can be declared using the same type of data specified.
[6 Marks]
e) Explain the following terms as used in database implementation. [3 Marks]
a. Primary key
b. Column
c. Row

QUESTION TWO (15 Marks)
a. A windows form application is needed where the user enters through a textbox the number of
fruits she has and then tells the user how many dozen fruits she has and how many extra fruits
are left over on separate textboxes after a button is clicked.
i). Sketch the design of the interface. (3 Marks)
b. A windows form application is required that captures Marks scored by a student in three units
via textboxes, then computes the average score and outputs the grade on a label once a button
“Determine” is clicked using the following criteria.

i). Design a possible interface for the application and label the controls used.
(2 Marks)
ii). Write the code segment linked to the button to fulfill the purpose of the application.
(3 Marks)
c. When designing desktop applications, various controls are used and programmed in order to
fulfill a given purpose.
i). Explain the operational differences between the following controls
a. ComboBox and ListBox (2 Marks)
b. RadioButtons and CheckBoxes (2 Marks)
c. PictureBox and GroupBox (2 Marks)
ii). Write code segment that closes a desktop application once button “EXIT” is clicked.
(1 Marks)
QUESTION THREE (15 Marks)
i). Jamii University has decided to build a student database that can manage all the students’
records. As a VB Programmer, suggest any three products they can use to build the
database. [3 Marks]
ii). Write a code segment that will bring back focus to a textbox named “txtscore”.
(1 Marks)
iii). State SIX important rules that a VB programmer is supposed to follow whenever he/she is
writing IF statement logic codes. [3 Marks]
iv). The figure below shows a trapezoid. Write a VB program that will solve the area of the
trapezoid given the values: (a=16, b=18, height=7). Give your answer. [3 Marks]


v). Draw a flow chart algorithm based on the following scenario below. [3 Marks]
“James tends to go golfing, mow the grass or sit on the porch when the weather
becomes warm but often chooses to drink a hot cup of tea or read a book when the
weather isn’t warm enough.”
vi). List any two security threats associated with database systems. [1 Marks]
v). Name the property used to hide a password when entered within a textbox. [1 Mark]
QUESTION FOUR (15 Marks)
i). Briefly explain the meaning of the following components of visual studio. [6 Marks]
a. .NET Framework Class Library
b. Common Language Runtime (CLR).
c. MSDN (Help).
i). ii). Write a VB Program that will display the following output when the “CheckOut”
button is clicked.
In your code, show various variables and calculations. [9 Marks]

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

Written by