0

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 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;
}
ChaosPandion
  • 77,506
  • 18
  • 119
  • 157
mrroberts
  • 13
  • 2
  • Unless @dlev solved the problem, you should tell us how it is not processing correctly. Something like actual vs. expected results. – Olivier L. May 21 '11 at 05:11

1 Answers1

1

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.

dlev
  • 48,024
  • 5
  • 125
  • 132
  • @dlev.... Thanks so much for pointing out that petty mistake that I made. I even had the formula written down in front of me and couldn't make sense why it was giving me an average that didn't make since. Thanks again. – mrroberts May 21 '11 at 10:16