You will compute a weighted average for each student in a class (grades are recorded in an excel spreadsheet) and display if each student passed or failed. Additionally, you will compute the class average, high, and low averages.
In the spreadsheet, the first column holds the student's program average, column 2 hold the midterm exam score, and column 3 holds the final exam score. A zero in the first column signifies the end of student data. The weights are 0.30, 0.30, and 0.40 respectively for program average, midterm, and final exam. Put the weighted average into column 4 and a "PASS" or "FAIL" into column 5.
In a MsgBox, display the class average, the high average of the class, and the low average of the class .
A weighted average is computed using the following formula:
       
progWeight*programs + midtermWeight*midterm + finalWeight*final
A Pass is given if the weighted average is greater than or equal to 70.
Sample data (in the spreadsheet):
70 60 50
50 50 50
80 90 80
0
For the sample data, your program produces the following results
(in the spreadsheet):
70 60 50 59 FAIL
50 50 50 50 FAIL
80 90 80 83 PASS
0
In a MsgBox, you will display:
Class average is 64 with a high of 83 and low of 50
Assignment Notes
-- Don't worry about formatting. The above example just happens to be whole
numbers. Use Cdbl to convert numbers for computing accuracy.
-- A file, lab3.vbs, is provided. It opens an excel spreadsheet.
Add your code, loops, etc. in the specified space.
-- The sample excel file, data3.xls, shows how the data will look.
-- The real data may be different from the sample data. Your program should be
written to the specifications, not the numbers. You can assume valid data
in the spreadsheet.