Due on Friday, March 19, 2004
Part A
Run the program ForSample4 that will create a file of 1000 marks from 30 to 100. The range 30 to 100 has been chosen so that the average marks will be more realistic. You will need the file for Part B.
Part B
Write a Java program that will do the following:
|
|
open the file marks.txt created in Part A |
|
|
read
all the marks and determine: the number of A's, B's, C's, D's, and F's (An A is given for 80 and above. A B is awarded for grades from 70 to 79. C's are assigned for marks from 60 to 69. A D is given for a mark from 50 to 59, and F is for marks less than 50.) the average mark to one decimal place the highest mark the lowest mark the range (difference between highest and lowest marks) the number of passing marks |
Submission method: To submissions folder > lab3
Evaluation:
| Documentation standards | /4 |
| File handling | /4 |
| Use of a for loop | /5 |
| Use of if statements | /5 |
| Correct number of A's, B's, C's, D's, and F's | /2 |
| Average mark to one decimal place | /2 |
| Highest mark | /2 |
| Lowest mark | /2 |
| Range | /2 |
| Number of passing marks | /2 |
| Total | /30 |