开发者

MAth Equation not working properly [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜