Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

VBN70US

VISUAL PROGRAMMING WITH VB.NET

DEGREE

YEAR 3

FINAL EXAMINATION

MAY/JUNE 2021

Instructions to Candidates:

1. Time Allowed: 3 Hours.


2. Answer any Three (3) Questions in Section A.
3. Answer all Questions in Section B.
4. All questions carry 20 marks each.
5. Calculators are allowed provided they are not programmable.
6. No books, dictionaries, papers, cell phones or any other written materials are
allowed in this examination.
7. Candidates who break IUM examination regulations or commit any malpractice
will be disqualified from the examinations.

Total Marks: 100

Examiner: Mrs E. Nangolo


Section A (Answer any 3 questions)

Question 1

Create a program called InvestmentManager. The program should allow a user to enter the
monthly amount a client would like to invest and the total investment term in months when a
client requests for an investment policy. The annual interest rate that determines how much
money clients make from their investments is 12%. Create a function called CalculateInvest
with three parameters that receives the monthly investment amount, number of months per
year that interest is compounded and the total investment time in years. This function should
calculate and display how much the client will pay in total, how much money in interest they
will gain for the total term and how much total money they will get from their investment at
the end of the term when the policy matures.
The formula to calculate how much the client will earn in total when the policy matures is
given below: A = P(1 + r/n)^n*t
A = Total amount earned for the entire term (total interest earned + total amount invested)
P = Total amount invested (principal amount= monthly investment amount * total investment
term in months(t*12))
r = 0.12 (interest rate (12%)
n = 12 (number of times interested is compounded per year (use 12 months))
t = total investment term in years [Total 20 Marks]

Question 2

Develop an application in Visual Basic to calculate the employees Gross Pay. The formula to
calculate the Gross Pay: GP = HW * HP
GP = Gross Pay
HW = Number of Hours Worked
HP = Hourly Pay Rate

The user interface must be as follow:

1
[Total 20 Marks]

Question 3

Create a program that takes in a person’s height and weight, calculates the BMI and then displays
their category using the information below. The formula for finding the Body Mass Index (BMI)
of a person is weight in kilograms divided by height in meters squared. (weight/height2).

BMI Categories:
Underweight = <18.5
Normal weight = 18.5–24.9
Overweight = 25–29.9
Obesity = BMI of 30 or greater [Total 20 Marks]

Question 4

As part of the IUM rules a student should attend 80% of all classes. A student will not be
allowed to sit in exam if his/her attendance is less than 75%. Create a program in Visual
Basic, Take the following input from user:
 Number of classes held
 Number of classes attended.
And print
 Percentage of class attended
 Is student is allowed to sit in exam or not.

[Total 20 Marks]

2
Section B (Answer all questions)

Question 1

a) Name and explain the four (4) main principles of object Oriented Programming.
(8 marks)
b) Why is it necessary to translate a program written in a high level language before it
can be executed? (4 marks)
c) Explain the processes of compilation and interpretation. (8 marks)

[Total 20 Marks]

Question 2

a) Describe the range of tools available to support the programming development


process for a team of programmers who work on collaborative projects.
(10 marks)

b) Evaluate the success of these tools in improving the productivity of


programmers and the quality of the code they produce. Include examples to back
up any points made. (10 marks)

[Total 20 Marks]

END OF QUESTION PAPER

You might also like