Women'S University in Africa: Addressing Gender Disparity and Fostering Equity in University Education
Women'S University in Africa: Addressing Gender Disparity and Fostering Equity in University Education
MAIN PAPER
IS122: VB.Net
INSTRUCTIONS TO CANDIDATES
1
Question 1
The monthly payment for a given loan pays the principal and the interest. The monthly interest is
computed by multiplying the monthly interest rate and the balance (the remaining principal).
The principal paid for the month is therefore the monthly payment minus the monthly interest.
Write a program that lets the user enter the loan amount, number of years, and interest rate and
displays the amortization schedule for the loan.
Here is a sample run:
[40]
Question 2
The American Heart Association suggests that at most 30% of the calories in our diet come from
fat. Although food labels give the number of calories and amount of fat per serving, they often
do not give the percentage of calories from fat. This percentage can be calculated by multiplying
the number of grams of fat in one serving by 9, dividing that number by the total number of
calories per serving and multiplying the result by 100.
Write a program that request the name, number of calories per serving and the grams of fat per
serving as input, and tell whether the food meets the American Heart Association
recommendations. [20]
Question 3
a) Write a sub program to find the largest, smallest, sum and average number of array of ten
numbers. [12]
b) Write a VB procedure to reverse the digits of given number e.g. 1234 => 4321. [8]
2
Question 4
a) Assume you want to generate a multiplication table of any given number from 1 to 12. Write
a program that allows the user to enter the number and then generate the multiplication table.
The output of a number 3 should look like this:
1 x 3 = 3
2 x 3 = 6
.
.
12 x 3=36 [12]
Question 5
Assume that there is a database titled “Student” in Microsoft Access. The database includes
address, name, and enrolment number of each student. Write a procedure that accepts enrolment
number as input and displays the student details as output. [20]
3
Question 6
For i = 0 To array.GetUpperBound()
total += array(i)
Next
Interest = 0
For Year =1 to NumberOfYears
Interest = Interest+((Principal + Interest))+ InterestRate/100)
Next Year
End Sub
End Class [10]
msgbox(price) [5]
END