Lab attendance was out of 100.
To convert the midterm and final to a score, I use the following routine:
double A = 90.0;
double B = 80.0;
double C = 70.0;
double D = 60;
double test_convert(double score, double top, double a,
double b, double c, double d)
{
if (score >= a) {
return (score - a)/(top - a) * (100.0-A) + A;
} else if (score >= b) {
return (score - b)/(a - b) * (A-B) + B;
} else if (score >= c) {
return (score - c)/(b - c) * (B-C) + C;
} else if (score >= d) {
return (score - d)/(c - d) * (C-D) + D;
} else {
return (score)/d * (D);
}
} |
The midterm scores are converted with:
test_convert(yourscore, 46, 35, 30, 24, 20);and the final scores are convered with:
test_convert(yourscore, 46, 38, 30, 25, 20);
I counted the midterm 25%, the final 26%, the labs 45%, and the attendance 4%.