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:
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:-...
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...
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...
Java debugging in eclipse
package edu.ilstu;
import java.util.Scanner;
/**
* The following class has four independent debugging
* problems. Solve one at a time, uncommenting the next
* one only after the previous problem is working correctly.
*/
public class FindTheErrors {
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
/*
* Problem 1 Debugging
*
* This problem is to read in your first name,
* last name, and current year and display them in
*...
Need code written for a java eclipse program that will follow
the skeleton code.
Exams and assignments are weighted
You will design a Java grade calculator for this assignment. A user should be able to calculate her/his letter grade in COMS/MIS 207 by inputting their scores obtained on worksheets, assignments and exams into the program. A skeleton code named GradeCompute.java containing the main method and stubs for a few other methods, is provided to you. You must not modify/make changes...