2 quizzes each graded on the basis of 10 points. The two quizzes together count
ID: 3655047 • Letter: 2
Question
2 quizzes each graded on the basis of 10 points. The two quizzes together count for total of 25% of the grade Do not accept entries of more than 10 or less than 0. Normalize the quizzes scores. Convert them to percentages before you average them. 1 midterm exam and one final exam, each graded on the basis of 100 points, are given. The midterm counts for 25% of the grade. Do not accept entries of more than 100 or less than 0. One (1) final exam graded on the basis of 100 points, and counts for 50% of the grade. Any grade of 90 percent or more is an A, any grade between 80 and 89 percent is a B, any grade between 70 and 79 percent is a C, any grade between 60 and 69 percent is a D, and any grade below 60 is an F. The program should read the studentExplanation / Answer
// Why not "class" (lower case)? // Should "class Assign7" be "public" (is it the main class in the module)? // Did you put any "import" statements above this? Class Assign7{ // Do you want to declare any member data before you start your "main()" function? public static void main(String[] args)throws Exception{ // Is "Record.setGP()" a "static method"? Record.setGP(1.25, 1.25, 0.25, 0.50); // Isn't this class-wide data? If so, shouldn't you put it *above* "main()"? int quiz1, quiz2; int tMidterm, tFinal,tQuiz int midterm = 0; int finalExam = 0; String name; char grade; // Do you really want to just bomb out of the program if this fails? Scanner myIn = new Scanner( new File("scores.txt") ); // Whoa!!!! Why are we starting a new function, *inside of "main()"*?!?! void getScore() { tQuiz = ((quiz1 + quiz2)/20)*.25; tMidTerm = (midTermExam/100)*.25; tFinal = (finalExam/100)*.50; finalScore = tQuiz + tMidTerm + tFinal; } // It looks like we're starting a new function here, too. // Where's your parenthesis and curly brace after "getLetterGrade"???? void getLetterGrade if (finalScore >= 90) { grade = 'A'; } // Supposing the grade was "99"? // Would the student get a "B" here? Or even a "D" below??? if (finalScore >= 80) { grade = 'B'; } ...
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.