BIT 2105 BBIT 112 BSD 1305 BAC 1304 – APPLICATION PROGRAMMING KCA Past Paper

UNIVERSITY EXAMINATIONS: 2019/ 2020
EXAMINATION FOR THE DEGREE OF BACHELOR OF SCIENCE IN
INFORMATION TECHNOLOGY/ BUSINESS INFORMATION
TECHNOLOGY/ APPLIED COMPUTING/ SOFTWARE DEVELOPMENT/
INFORMATION SECURITY & FORENSCIS
BIT 2105/ BBIT 112/ BSD 1305/ BAC 1304: APPLICATION
PROGRAMMING
FULL TIME/PART TIME/DISTANCE LEARNING
DATE: MAY, 2020 TIME: 6 HOURS
INSTRUCTIONS: Answer ALL Questions
SECTION B: (20 MARKS)

QUESTION ONE
a) A Visual Basic application program is to be linked to a table Customers in a database called
“NWind.mdb”. The following are the fields in the database table named Customers, which
are displayed using the textbox controls:
[Customer ID, Names, Address, City]
i) Write the code that will be generated for adapter’s Fill method in the form’s Load
event procedure and modify it by adding a Try-Catch block to catch exceptions in
situations where a network connection fails.
[5 Marks]
ii) Write the code that will be generated for the Save button of the binding navigator
control and modify it by adding a Try-Catch block to catch exceptions.
[5 Marks]
b) Using arrays, write a Visual Basic program that allows the user to input the employee names
and the monthly incomes for ten employees working in a warehouse department. Your
program should then compute and display the employee name, monthly income, total yearly
income and the average yearly income for the ten employees using a list box control. Sketch
your GUI.
[10 Marks]
SECTION C: (20 MARKS)
QUESTION ONE
a) A program is required to determine the gross pay for each of several employees of a certain
company. The company pays “straight-time” for the first 40 hours worked by each employee
and pays “one-and –a half time” for all hours worked in excess of 40 hours. You are given a
list of employees of the company, the number of hours each employee worked and the
hourly rate of each employee. Your program should input this information for each
employee, and then compute and display the employee’s gross pay. Use textboxes for both
inputs and outputs.
Required:
i). Design your graphical user interface
[2 Marks]
ii). Write the program code to compute gross pay. Your program should validate the inputs
in such a way that the names of the employee must be input, the number of hours
worked and pay rate must be numeric, greater than zero but less than or equal to 60 and
greater than zero respectively. Display an appropriate message in case of violation.
[10 Marks]
b) Design and implement a program the showcase an implementation of ; An object, class and
inheritance [8 Marks]

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

Written by