MAth Equation not working properly [closed]
I have been working on a math equation for 2 days. The whole process is supposed to take the information from a driver and the return the final average. However, for some reason it is not processing correctly. Any ideas would be much appreciated.
public double Overall() {
double开发者_JS百科 finalProjectGrade = ((projectGrade1 * 0.1) + (projectGrade2 * 0.1) + (projectGrade3 * 0.1) + (projectGrade4 * 0.1));
double finalQuizGrade = ((quizGrade1 * 0.5) + (quizGrade2 * 0.5));
double finalTest = (finalExam * 0.25);
double finalParticipationGrade = (participationGrades * 0.25);
double Overall = ( finalProjectGrade + finalQuizGrade + finalTest + finalParticipationGrade);
return Overall;
}
I'm pretty sure you mean 0.05, not 0.5, for the quiz grades. Right now, you're giving them a weight of 50% each.
精彩评论