Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Computer Science 2019 Mark Scheme 4021/3 compiled by Engineer Nyamz

Question 1

Public Class Form1


Private Sub btnCalculate_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles btnCalculate.Click

Dim weight, height, BMI As Single


weight = txtWeight.Text
height = txtHeight.Text
BMI = (weight) / height ^ 2
txtDisplayBMI.Text = BMI

End Sub
End Class

Question 2

Public Class Form1


Private Sub btnCalculate_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles btnCalculate.Click

Dim price, totalpurchase As Single


Dim quantity As Integer
price = txtPrice.Text
quantity = txtQuantity.Text
totalpurchase = price * quantity
txtTotalPurchase.Text = totalpurchase

End Sub
End Class
Computer Science 2019 Mark Scheme 4021/3 compiled by Engineer Nyamz

Question 3

Public Class Form1


Private Sub btnCalculateBonus_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnCalculateBonus.Click

Dim name As String


Dim annualsales, percentagebonus, bonus As Single
name = txtName.Text
annualsales = txtAnnualSales.Text
If annualsales > 20000 Then
percentagebonus = 20 / 100
Else
percentagebonus = 5 / 100
End If
bonus = percentagebonus * annualsales
txtBonus.Text = bonus

End Sub
End Class

Question 4

Public Class Form1


Private Sub btnEvaluateYear_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnEvaluateYear.Click

Dim year As Integer


Dim result As String
year = txtYear.Text
If year Mod 4 = 0 Then
result = ("leap year")
Else
result = ("not a leap Year")
End If
txtResult.Text = result

End Sub
End Class
Computer Science 2019 Mark Scheme 4021/3 compiled by Engineer Nyamz

Question 5(a)

Question 5(b)

Question 5(c)
Computer Science 2019 Mark Scheme 4021/3 compiled by Engineer Nyamz

Question 5(d)
Computer Science 2019 Mark Scheme 4021/3 compiled by Engineer Nyamz

Question 5(e)

Question 5(f)
Computer Science 2019 Mark Scheme 4021/3 compiled by Engineer Nyamz

Question 5(f)
Computer Science 2019 Mark Scheme 4021/3 compiled by Engineer Nyamz

Question 6(a)

<html>

<head><title>Mambo hotel</title></head>

<p>main page</p>

<body>

<p>Although the purpose of staying here is to explore the most famous heritage site in<br>

Zimbabwe, guest at our hotel have the use of a swimming pool, tennis court and a<br>

volley pitch.closer to the hotel are numerous curio shops where you can buy <br>

interesting gofts for friends and a family back home</p></br>

</body>

</html>
Computer Science 2019 Mark Scheme 4021/3 compiled by Engineer Nyamz

<html>

<head><title>The location page</title></head>

<body>

<p>you will find accomodationb closer to the Mambo Monunents than <br>

Mambo Hotel. The hotel is located less than 20km form the city of Bulawayo</p>

</body>

</html>

<html>

<head><title>Mambo hotel</title></head>

<body>

<p>The accomodation page</p>

<p>Mambo Hotel offers spacious and comfortable accomodation in single rooms<br>

and double rooms. All the rooms are en-suited and are equipped with tea/coffe<br>

facilities, telephone and satellite TV services.</p>

<p>The table below shows the status of the room, wheather they are booked or not.</p>

<table border="4">

<tr>

<td>single</td>

<td>double</td>

<td>status</td>
Computer Science 2019 Mark Scheme 4021/3 compiled by Engineer Nyamz

</tr>

<tr>

<td>25</td>

<td>15</td>

<td>Booked</td>

</tr>

<tr>

<td>10</td>

<td>30</td>

<td>Not booked</td>

</tr>

</body>

</html>

You might also like