Hello, I am new to java and I was wondering if you guys could help me solve this problem:

Your history instructor gives three tests worth 50 points each. you can drop one of the first two grades. your final grade is the sum of the best of the first two grades and the third grade. Given three test grades, write a program that calculates the final letter grade using the following cut-off points. The output should list all thee test grades, state what test was dropped and the final letter grade.

>=90 A
<90, >=80 B
<80, >=70 C
<70, >=60 D
<60 F

(please use if/else statement)

Recommended Answers

All 3 Replies

what have you coded so far?

what have you coded so far?

That is my problem I don't understand how to put it togather....I know how to get parts of the code...I just don't know how to put it all togather

average =(test1+test2+test3)/3;
        {
        if(average1>=90)
            Grade1='A';
        else if(average1>=80)
            Grade1='B';
        else if(average1>=70)
            Grade1='C';
        else if(average1>=60)
            Grade1='D';
        else
            Grade1='F';

Your history instructor gives three tests worth 50 points each.

Is this given in the program or is this user input?

you can drop one of the first two grades. your final grade is the sum of the best of the first two grades and the third grade.

make an if else statements that checks which of the two first grade is higher
this will be used in printing out which of the tests was dropped

average =(test1+test2+test3)/3;

the original instruction you posted said that you need to get the grade of which is higher between the first test and the second and add that to the third test. It did not say anything about getting the average of the exams

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.