Sunteți pe pagina 1din 7

AUTHENTIC LEARNING ASSESSMENT ACTIVITIES

Activity 1:

Design a user interface to look exactly as the one below. The user must be able to enter
his or her name and the color and make of his/her car. The input values must then be
combined into a sentence and must be displayed on the label in the following way.
Provide for a default and cancel button. Once again you may assume that the user will
enter valid values before the display button is clicked. This is also a very considerate
programmer because, based on the message, everybody will be smart, no
matter what they drive!

Practical

1
Activity 2:

A problem statement:

Kevin works 8 hours per day at a pay rate of R11 per hour. He has to pay R12 taxi fare
per day. How much money will he take home after a 5 day work week?

Activity 3:

Answer the following questions, based on the user interface provided below. This user
interface is designed to enter the minimum and maximum temperature for a day and to
display the average temperature.

1. Another name for a user interface is a ____________________

a. Frame
b. Form
c. Facing
d. Feature
e. None of the above

2. This user interface contains the following number of components

a. 6
b. 9
c. 3
d. 4
e. None of the above

2
3. This user interface must contain code for ________ events

a. 6
b. 9
c. 3
d. 4
e. None of the above

4. In this user interface, the Calculate button is the ______________ button

a. Accept button
b. Cancel button
c. Default button
d. First button
e. None of the above

5. In the given user interface, the value of the text property of the Clear-button is
____________

a. Clear
b. ‘Clear’
c. &Clear
d. C&lear
e. Clear

6. The text align property of all the buttons on the user interface is set to _____________

a. Middle
b. Middle Centre
c. Middle Right
d. Middle Left
e. Centre

7. On the user interface provided, the following controls are used to enter the minimum
and maximum temperatures

a. Text boxes
b. Labels
c. Buttons
d. Edit box
e. None of the above

8. The average temperature is displayed on a __________ called lblAve.

a. Text box
b. Label

3
c. Button
d. Group Box
e. None of the above

4
Solutions for all activities:

Activity 1: Solution

5
CODE EDITOR

Public Class frmPractical

Private Sub btnDisplay_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles btnDisplay.Click
‘Display the message

lblDriverMessage.Text = txtName.Text & " " & "you are smart!!"


& ControlChars.NewLine & _
"You drive a" & txtModel.Text
End Sub

Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnClear.Click
‘Clear the text on the screen

txtName.Text = " "


txtColor.Text = " "
txtModel.Text = " "
lblDriverMessage.Text = " "
txtName.Focus()
End Sub

Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnExit.Click
‘Exit the program
Close()
End Sub
End Class

6
Activity 2: Solution

Money = (hour * payRate – transport)*noDays


= (8 * 11 – 12) * 5
= R380.00

Activity 3: Solution

1. B
2. C
3. C
4. D
5. A
6. B
7. A
8. A

S-ar putea să vă placă și