
![8 9 10 11 public class GradeCalculator { /** * @param args not used */ public static void main (String[] args) { //Declare co](http://img.homeworklib.com/questions/65f24620-4975-11ec-940f-67540e542c2f.png?x-oss-process=image/resize,w_560)


CODE IN JAVA:
import java.util.Scanner ;
public class TestScores {
public static void main(String[] args) {
int homeworkWeight = 15, testWeight
= 35, midWeight = 20, finalWeight = 30 ;
Scanner sc = new
Scanner(System.in);
System.out.print("How many homework
scores to enter? ");
int numberOfHomeworks =
sc.nextInt();
int i = 1 ;
double homeworkScore,
totalHomeworkScores = 0, homeworkAvg ;
while(i <= numberOfHomeworks)
{
System.out.print("Enter homework score #" + i + ": ");
homeworkScore =
sc.nextDouble();
totalHomeworkScores += homeworkScore ;
i += 1 ;
}
homeworkAvg = totalHomeworkScores /
numberOfHomeworks ;
System.out.print("How many test
scores to enter? ");
int numberOfTestScores =
sc.nextInt();
i = 1 ;
double testScore, totalTestScores =
0, testScoreAvg ;
while(i <= numberOfTestScores)
{
System.out.print("Enter test score #" + i + ": ");
testScore =
sc.nextDouble();
totalTestScores
+= testScore ;
i += 1 ;
}
testScoreAvg = totalTestScores /
numberOfTestScores ;
System.out.print("Enter Mid score:
");
double mid = sc.nextDouble();
System.out.print("Enter Final score
: ");
double finalEx =
sc.nextDouble();
double finalScore = (homeworkAvg *
homeworkWeight / 100) + (testScoreAvg * testWeight / 100) + (mid *
midWeight / 100) + (finalEx * finalWeight / 100);
System.out.println("Grade Average:
" + finalScore);
if(finalScore >= 90) {
System.out.println("Letter grade : A");
System.out.println("Good job! You can advance to the next
course.");
}
else if(finalScore >= 80)
{
System.out.println("Letter grade : B");
System.out.println("Good job! You can advance to the next
course.");
}
else if(finalScore >= 70)
{
System.out.println("Letter grade : C");
System.out.println("Good job! You can advance to the next
course.");
}
else if(finalScore >= 60)
{
System.out.println("Letter grade : D");
System.out.println("I'm sorry. You will have to repeat the course
before advancing.");
}
else {
System.out.println("Letter grade : F");
System.out.println("I'm sorry. You will have to repeat the course
before advancing.");
}
sc.close();
}
}
OUTPUT:
![<terminated > TestScores [Java Application] C:\Program Files\Java\jdk-13.0.1\bin\javaw.exe (25-Oct-2020, 2:13:37 am) How many](http://img.homeworklib.com/questions/cc3213e0-4975-11ec-bbf9-010a72062994.png?x-oss-process=image/resize,w_560)
Declare and initialize 4 Constants for the course category weights: The weight of Homework will be...
this code is not working for me.. if enter 100 it is not showing the grades insted asking for score again.. #Python program that prompts user to enter the valuesof grddes . Then calculate the total scores , #then find average of total score. Then find the letter grade of the average score. Display the #results on python console. #grades.py def main(): #declare a list to store grade values grades=[] repeat=True #Set variables to zero total=0 counter=0 average=0 gradeLetter='' #Repeat...
Finish the given ProcessFile.java program that prompts the user for a filename and reprompts if file doesn’t exist. You will process through the file skipping any text or real (double) numbers. You will print the max, min, sum, count, and average of the integers in the file. You will want to create test files that contain integers, doubles, and Strings. HINT: Use hasNextInt() method and while loop. You may also want to use Integer.MAX_VALUE and Integer.MIN_VALUE for the initialization of...
Write a grading program for the following grading policies:- a. There are two quizzes, each graded on the basis of 10 points. b. There is one midterm exam and one final exam, each graded on the basis of 100 points. c. The final exam counts for 50 percent of the grade, the midterm counts for 25 percent and the two quizzes together count for a total of 25 percent. Grading system is as follows:- >90 A >=80 and <90 B...
Write a grading program in Java for a class with the following grading policies: There are three quizzes, each graded on the basis of 10 points. There is one midterm exam, graded on the basis of 100 points. There is one final exam, graded on the basis of 100 points. The final exam counts for 40% of the grade. The midterm counts for 35% of the grade. The three quizzes together count for a total of 25% of the grade....
In C Langage Write a grading program for a class with the following grading policies:- a. There are two quizzes, each graded on the basis of 10 points. b. There is one midterm exam and one final exam, each graded on the basis of 100 points. c. The final exam counts for 50 percent of the grade, the midterm counts for 25 percent and the two quizzes together count for a total of 25 percent. Grading system is as follows:-...
(C++) I need to alter the code below to fit the given requirements. You will need to move the calculations to a function. A second function to return the Letter Grade. You will need to define a namespace to contain the CONST. Also, need to define an enum for letter grades: A, B, C, D, and F. Console Student Grade Calculation Form First Name: Larry Last Name: Hobbs Homework Average: 65 Midterm Grade: 90 Final Exam Grade: 75 Student: Larry...
Professor Dolittle has asked some computer science students to write a program that will help him calculate his final grades. Professor Dolittle gives two midterms and a final exam. Each of these is worth 100 points. In addition, he gives a number of homework assignments during the semester. Each homework assignment is worth 100 points. At the end of the semester, Professor Dolittle wants to calculate the median score on the homework assignments for the semester. He believes that the...
Test Scores and Grade
Write a program that has variables to hold three test scores.
The program should ask the user to enter three test scores and then
assign the values entered to the variables. The program should
display the average of the test scores and the letter grade that is
assigned for the test score average. Use the grading scheme in the
following table:
Test Score Average
Letter Grade
90–100
A
80–89
B
70–79
C
60–69
D
Below 60...
/* C++ program that prompts the user to enter the name of the student, enter the five scores values. Then calculate the total scores of the student. Then finally calculate the average score of the total score value. Then, print the name, total score , average scrore value on console output. */ //main.cpp //include header files #include<iostream> #include<string> #include<iomanip> using namespace std; //start of main function int main() { //declare variable to read string value string studentName; ...
using if/switch statements (C++) Write a grading program for a class with the following grading policies: There are two quizzes, each graded on the basis of 10 points There is one midterm exam and one final exam, each graded on the basis of 100 points The final exam counts for 50% of the grade, the midterm counts for 25% and the two quizzes together count for a total of 25%. (Do not forget to normalize the quiz scores. They should...