I don't see anything in your program yet to keep track of the 18 labs that are supposed to be worth 1.4 points each. It's not clear whether the labs are to be graded or simply full points awarded for each lab completed. I can guess that attendance is 21 days (18 * 1.4 = 21 * 1.2). That means that labs and attendance together can earn a total of 50.4 points, which is supposed to represent 50% of the grade, which implies that the other 50%, average test score, is also worth 50.4 points.
Anyway, it seems like the math is essentially this:
Code:
finalGrade = 50.4 * (testAverage/100) + 1.2 * (21 - daysMissed) + 1.4 * labsCompleted; // or maybe 1.4 * (totalLabScore / 1800) assuming each lab is scored 0-100