100% found this document useful (2 votes)
84 views2 pages

Practice For Programming Using VB

This document provides instructions for validating user input and performing calculations in a student exam application. It includes the following steps: 1. Validate the employee ID, name, country, and gender fields upon losing focus or button click. 2. When the save button is clicked, calculate the total score by adding the test scores and display in the total textbox. 3. Calculate the average score by dividing the total by 3 and display in the average textbox. 4. Set the status field to A, B, or C based on comparing the average to grade thresholds.

Uploaded by

Passetta
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
84 views2 pages

Practice For Programming Using VB

This document provides instructions for validating user input and performing calculations in a student exam application. It includes the following steps: 1. Validate the employee ID, name, country, and gender fields upon losing focus or button click. 2. When the save button is clicked, calculate the total score by adding the test scores and display in the total textbox. 3. Calculate the average score by dividing the total by 3 and display in the average textbox. 4. Set the status field to A, B, or C based on comparing the average to grade thresholds.

Uploaded by

Passetta
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Programming Using VB

PRACTICE EXERCISE
TXTIDNO

TXTNAME

CMBCOUNTRY

OPT FEMALE

OPTMALE

CMDSAVE

a. When the EmployeeID textbox loses focus, check that a value entered is always between 1000 and
2000 inclusive.
b. When the Employee Name textbox loses focus, check that the name entered is always less than or
equal to 7 characters.
c. When the Country combobox loses focus, check that the country selected in the Select Country
combo box is always Jamaica.
d. When the Save Details button is clicked, check that any one of the gender is selected compulsory

Page 1 of 2
TXTSTUIDNO

TXTSNAME

TXTTEST1

TXTTEST2

TXTTEST3

TXTTOTAL

TXTAVERAGE
CMDSAVE
CMDADD
TXTSTATUS

a. When the Total text box is clicked, add the values in Test1, Test2 and Test3 text box and display the
result in Total textbox.
b. When the Average textbox gets focus, calculate the average (Average= Total / 3). Display the result
in the average textbox.
c. When the SAVE button is clicked, set the value of Status based on the average in the Average text
box.
Average Grade
0 TO 40 C
41 TO 70 B
71 TO 100 A

Page 2 of 2

You might also like