BIT 4202 ADVANCED APPLICATION PROGRAMMING KCA Past Paper

UNIVERSITY EXAMINATIONS: 2011/2012
THIRD YEAR EXAMINATION FOR THE BACHELOR OF
SCIENCE IN INFORMATION TECHNOLOGY
BIT 4202 ADVANCED APPLICATION PROGRAMMING
DATE: AUGUST, 2012 TIME: 2 HOURS
INSTRUCTIONS: Answer Question ONE and any other TWO

QUESTION ONE
a) i. Define Menus as used in vb.net (2 Marks)
ii. Explain why you would prefer menus to command buttons in your
application (3 Marks)
iii. Describe MenuStrips as used in vb.net (3 Marks)
iv. List three controls that can be added to menustrips (3 Marks)
v. Briefly describe Microsoft’s Visual Studio (also called Visual
Studio.NET) programming environment (4 Marks)
b) i. Draw a flow chart for the if statement shown below (6 Marks)
If HoursDecimal <= 40D Thens
‘Pay only regular time
GrossPayDecimal = Decimal.Round(HoursDecimal * PayRateDecimal, 2)
Else
‘Pay regular time + overtime
GrossPayDecimal = Decimal.Round((40D * PayRateDecimal) + _
((HoursDecimal – 40D) * PayRateDecimal * 1.5D), 2)
End If
ii. VB has two different types of constants. Describe them using examples to
illustrate (6 Marks)
c) Describe how local variables and module level variables are declared in VB
(4 Marks)
d) Differentiate between list box, checked Listbox and combo box as used in
VB.NET (2 Marks)
QUESTION TWO
a) A firm needs to be able to quickly compute the value of any item in inventory.
Build a form that will enable inputting values into three textboxes: (1) product
description, (2) quantity on hand, and (3) 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. (20 Marks)
QUESTION THREE
a) When Visual Studio is installed on a computer, there are two mandatory
components to the installation and an optional third component. Describe these
three components (12 Marks)
b) The VB code segment shown below is incorrect. Identify the error and write the
correct code (8 Marks)
Illegal Syntax
If HoursDecimal <= 40D Then
RegularPayCheckBox.Checked = True
Else if RegularPayCheckBox.Checked = False
End If
QUESTION FOUR
a) Analyze this coding segment and determine which message box will display.
(10 Marks)
‘Assign a value to two strings and compare them
Name1String = “Donnie”
Name2String = “Doug”
If Name1String > nameString2 Then
MessageBox.Show(“Name: ” & Name1String & ” is bigger”)
Else
MessageBox.Show(“Name: ” & Name2String & ” is bigger”)
End If
b) Describe using examples how to define keyboard access keys (hot keys) for
buttons and other controls. (6 Marks)
c) Explain the use of hot keys in VB .net (4 Marks)
QUESTION FIVE
a) Using examples to illustrate differentiate between the Parse method and the
Globalization enumeration as used in vb.net (6 Marks)
b) Describe using an example in VB the use of ToUpper and Tolower methods
(6 Marks)
c) Using sample VB code declare a module-level array and store values to the array
immediately. (8 Marks)

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

Written by