Assignment No. 4

Variables and Conditional Statements

Convert number grades to letter grades


Project 3-2


·         The user enters a numerical grade from 0 to 100 and clicks the Convert button or presses the Enter key to activate that button.

·         The application calculates the letter grade corresponding to the numerical grade and displays it in a label on the form.


·         The grading criteria follow:

A   90-100

B    80-89

C    65-79

D   50-64

F    <50

·         Assume that the user will enter a valid integer for the grades so your code doesn’t have to check this entry for validity.

·         Code the application using the If…Then…Else statement. 

·         Show an error message if the grade entered is out of range (less than zero or greater than 100).

·         Save the project and solution as Grades1.

·         Make a copy of the entire solution folder and name the new folder Grades2.  Open the Grades2 folder and change the If…Then…Else statement that calculates the price per unit to a Select Case…End Select statement.

·         You should now have two forms in your solutions that are coded differently, but look the same and do exactly the same thing.  Compress the solution folders that you have created into Zip files and upload into Canvas.