Write a java program that will ask the user for the number of exams they took. U
ID: 3647419 • Letter: W
Question
Write a java program that will ask the user for the number of exams they took. Using a loop prompt the user for each exam grade. Calculate the average(the average equation must be outside the loop). Display the result. Test your results.Using the above program . Add an else/if structure that determines the letter grade value based on the average score using an if else structure the typical grading scale(90 and above equals A.....). Display the numeric grade average and the letter grade
Explanation / Answer
input student's grade if grade < 100 AND grade > 75 { student got an A } else if grade < 75 AND grade > 60 { student got a B } else if grade < 60 AND grade > 50 { student got a C } else if grade < 50 AND grade > 40 { student got a D } else { student got an F } // didn't fit into any of the above scenerios, so must be an F print to screen what the student got class Testy { byte score; Testy() { score=78; } public static void main(String arg[]) { Testy tst=new Testy(); tst.processGrades(); } public void processGrades() { if (score >=75) { System.out.println("Your grade is A"); } else if ((score >= 60)&&( score =50 )&&(score=40 )&&(scoreRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.