Visual Basic
Assignment #5
due May 7, 1999
This page has been visited
times since April 22, 1999.
What new topics are covered in this assignment?
Description of Assignment #5
This assignment will use a Select Case statement to convert a numeric mark to a letter. The following table shows the relationship between the mark and the letter:
| Numeric Mark | Letter |
| < 60 | F |
| 60 - 69 | D |
| 70 - 79 | C |
| 80 - 89 | B |
| 90 - 99 | A |
| 100 | A+ |
Note that there are three different checks that the input must pass before we do the conversion. The first is that there is valid input, i.e. the user did not enter an empty string or click cancel. The second is that the input is in fact a numeric value. The third is that the mark entered is between 0 and 100. It is always good programming to check for all possible data input errors when writing a program. This makes your program more robust and complete.
The method for completing this assignment is as follows.
There will be no exercise for this assignment, since it is quite straight forward. As always, you should read the pertinent parts of the textbook before doing the assignment. If you have any questions please email me. The executable of this assignment can be downloaded below.
Note: Test my program with all the possible input values to see how it works, so that you can make yours the same. When I say all possible input values I mean one value from each mark range, and one value from each possible error category, i.e. no input, non-numeric input, and a mark outside the 0-100 range.
This is how you should test your program as well.
Good luck.
Below are the assignment 5 downloads:
If you have Visual Basic 6 installed on your computer, download the Assignment #5 file only.
If you do not have Visual Basic 6 installed on your computer, you will need the Visual Basic 6 .dll files in addition to the assignment #5 file. The .dll download below is the same one used for assignments 1 to 4, so if you already downloaded it you will not need to download it again. Simply use the same files. Otherwise download both the Assignment #5 file and the Assignment 5 required .dll files below. To run, place all files in the same directory and double-click on calcmark.exe.
Assignment #5 file (4,000 bytes)
Assignment 5 required .dll files (1.3 million bytes)
To e-mail me click here
Page created and maintained by Ron Patterson