BIT 2105 BBIT 2105  BAC 1304  BSD 1305  APPLICATION PROGRAMMMING.

UNIVERSITY EXAMINATIONS: 2020/2021
EXAMINATION FOR THE DEGREE OF BACHELOR OF SCIENCE IN
INFORMATION TECHNOLOGY/ BUSINESS I.T/ APPLIED COMPUTING/
SOFTWARE DEVELOPMENT
BIT 2105/ BBIT 2105/ BAC 1304/ BSD 1305:
APPLICATION PROGRAMMING
FULL TIME/PART TIME/ DISTANCE LEARNING
ORDINARY EXAMINATION
DATE: DECEMBER, 2021 TIME: 2 HOURS
INSTRUCTIONS: Question ONE IS COMPULSORY, Choose TWO OTHER Questions

QUESTION ONE (20 marks) Compulsory
a) State and explain the role of any three windows available in .NET IDE. [6 marks]
b) Below is a GUI for a calculator. Study it and answer the questions that follow


Write code to be attached to the following command buttons.
i.) Calculate – Computes and outputs the sum, product and average in the appropriate textboxes.
[7 marks]
ii.) Delete – To delete data from all the textboxes [3 marks]
iii.)Lock – Ensure that the three textboxes for data entry can gain control but the data cannot be
manipulated, deleted or typed. [2 marks]
iv.)Exit – End the application [2 marks]
QUESTION TW0 (15 marks)
a). State any three differences between VB and VB.NET (3 marks)
b). Explain the use of the keyword Redim as used when processing arrays in Visual Basic. Give an
example of a code snippet. (2 marks)
c). When programming for databases in Visual Basic, what is the difference between a DataReader
and a Dataset. Explain any two. (2 marks)
d). Use the select case decision structure to write a Visual Basic code snippet that can grade a
student based on the grading criteria shown below: (8 marks)

QESTION THREE (15 marks)
Consider the form interface below and use it to answer the questions that follow.


a) Write VB code statements that convert the values captured in textfields labelled value 1, value 2
and value 3 into integers. (3 marks)
b) Write a code snippet that calculates the sum of the values entered. (3 marks)
c) Write two different functions that takes in the values as parameters and calculates the minimum
value and the maximum value. (6 marks)
d) Write code snippet that can be used to display the value average on a textfield_average found on
a second form called form2. (3 marks)
QUESTION FOUR (15 marks)
a) Write a simple windows application program that uses an array structure to store 10 integer
numbers entered though the keyboard, the program should compute the sum and mean of the
numbers stored and display the results on a label named lblsum and lblmean respectively. Sketch
the GUI. (5 marks)
b) Demostrate the steps followed when setting up a connection to a database or other type of data
source using VB.NET (5 Marks)
c) Write a program that reads in a number through a text box. If the number is greater than five it
displays the cube of the number, else it displays the square of the number (5 marks)

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

Written by