Professional Documents
Culture Documents
Bbit Exam5
Bbit Exam5
(d) Differentiate between Option Explicit and Option Strict as used in VB.net 4Marks
f) Describe the various variable scopes in VB.net and explain how there are declared marks.
9 Marks
QUESTION TWO (20 MARKS)
Develop the interface and Write the code to process the logic below:
A normal work week is 40 hours. The university employs both salary and hourly workers.
Hourly workers are paid an hourly base with time-and-a-half (1.5 of normal hour) for hours
exceeding 40 hours. Hours are measured to the nearest 1/10th of an hour. Salaried employees
receive a salary base of $800/week. Data are entered into two TextBox controls for the hours
worked (HoursWorkedTextBox) and pay rate (PayRateTextBox). Two RadioButton controls are
available for selection – these are named HourlyRadioButton and SalaryRadioButton. Compute
the gross pay for an individual and display the value formatted as currency to a TextBox control
named GrossPayTextBb).
20 Marks
d) ) Write code for a button named Agechecker that allow the user to tests if a person is a) A
teenager, b) in their twenties, c) in their thirties, or d) none of the above. Clicking the button is
the same as clicking the menu Agechecker on the menu. 12 Marks
b) Describe using an example the use of ToString and ToLower methods as used inVB.net
6Marks
c) Using sample VB code declare a module-level array and store values to the array
immediately. 8Marks