Java Program:
In this project, you will write a program called GradeCalculator that will calculate the grading statistics of a desired number of students. Your program should start out by prompting the user to enter the number of students in the classroom and the number of exam scores. Your program then prompts for each student’s name and the scores for each exam. The exam scores should be entered as a sequence of numbers separated by blank space. Your program will also check for negative scores. If any score is negative, it will prompt the user to reenter the scores. You do not have to deal with inputs that are not numbers. For each student, calculate the student’s the average score, lowest score, highest score, letter grade, and the number of stars to give the student. Once the letter grade has been calculated, use it to calculate an appropriate number of stars the student will received. The letter grade is computed as followed: 90 to 100 is A, 80 and less than 90 is B, 70 and less than 80 is C, 60 and less than 70 is D, anything less than 60 is F. The number of stars is assigned as followed: A is 4 stars, B is 3 stars, C is 2 stars, D is 1 star, and F is 0 stars (no star). The program then displays the statistics about the student as shown in the sample run. Before the program terminates, it prints the class statistics: average grade, lowest grade, highest. See sample output for format. See sample run to have a better idea of what the program should do. Grading: Your program will be graded on a ten-point scale. Your program is expected to have comments. Try to match your output with the same run. Submission: Upload your solution to assignment 1 in blackboard. Sample Run: Welcome to GradeCalculator!
Please enter the number of students: 2 Please enter the number of exams : 3
---------------------------------------- Enter student 1’s name : Sample Name Enter exam scores : 90 100 -80 Invalid exam scores, reenter: 90 100 80
Grade statistics for Sample Name Average : 90 Letter grade: A Sample Name gets 4 stars! ****
---------------------------------------- Enter student 2’s name: Another Name Enter exam scores: 80 95 70
Grade statistics for Another Name Average : 81.66 Letter grade: C Another Name gets 2 stars! **
---------------------------------------- Class statistics: Average: 85.83 Lowest : 81.66 Highest: 90
Done. Good bye!
import java.util.*;
public class Main
{
public static char getgrade(double score)
{
if(score>=90&&score<=100)
return 'A';
else if(score>=80&&score<90)
return 'B';
else if(score>=70&&score<80)
return 'C';
else if(score>=60&&score<70)
return 'D';
else
return 'F';
}
public static String getstars(char grade)
{
if(grade=='A')
return " gets 4 stars!****";
else if(grade=='B')
return " gets 3 stars!***";
else if(grade=='C')
return " gets 2 stars!**";
else if(grade=='D')
return " gets 1 star!*";
else
return " No Stars for F grade";
}
public static void main(String[] args)
{
int num_students,num_exams;
String name;
char letter_grade;
char class_grade;
Scanner s = new Scanner(System.in);
System.out.println("Welcome to
GradeCalculator!");
System.out.println("Please enter
the number of students: ");
num_students=s.nextInt();
System.out.println("Please enter
the number of exams: ");
num_exams=s.nextInt();
double
score,student_average=0,class_average=0,student_lowest,student_highest,class_lowest=101,class_highest=0;
for(int
i=0;i<num_students;i++)
{
student_average=0;
student_lowest=101;
student_highest=0;
System.out.println("Enter student
"+(i+1)+"’s name : ");
name=s.nextLine();
name=s.nextLine();
System.out.println("Enter exam
scores : ");
for(int
j=0;j<num_exams;j++)
{
score= s.nextDouble();
while(score<0||score>100)
{
System.out.println("Invalid exam scores, reenter: ");
score= s.nextDouble();
}
if(score<student_lowest)
student_lowest=score;
if(score>student_highest)
student_highest=score;
student_average=student_average+score;
}
student_average=student_average/num_exams;
class_average=class_average+student_average;
System.out.println("Grade
statistics for "+name+" Average: "+student_average+" Student
Lowest: "+student_lowest+" Student Highest: "+student_highest+"
Letter Grade: "+getgrade(student_average)+"
"+name+getstars(getgrade(student_average)));
if(student_average<class_lowest)
class_lowest=student_average;
if(student_average>class_highest)
class_highest=student_average;
}
class_average=class_average/num_students;
System.out.println("Class
statistics: Average: "+class_average+" Lowest: "+class_lowest+"
Highest: "+class_highest+" Grade: "+getgrade(class_average)+"
Class: "+getstars(getgrade(class_average)));
}
}

Java Program: In this project, you will write a program called GradeCalculator that will calculate the...
I asked a question similar to this one, which was answered perfectly. Another practice problem is now asking me to use two classes and get user input. For this Java program, you will write two classes: GradeCalculator and GradeCalculatorDriver In the GradeCalculator class, compute the final average and letter grade for a particular student. The final average is calculated according to the following rules: 1) There are ten exams scored out of 100 points 2) The lowest exam score is...
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....
Develop an interactive program to assist a Philosophy professor in reporting students’ grades for his PHIL-224.N1 to the Office of Registrar at the end of the semester. Display an introductory paragraph for the user then prompt the user to enter a student record (student ID number and five exam-scores – all on one line). The scores will be in the range of 0-100. The sentinel value of -1 will be used to mark the end of data. The instructor has...
in C++ Create a program that will calculate a student’s grade average of 5 test scores and assign a letter grade for a student. The program should use a class to store the student’s data including the student’s name and score on each of 5 tests. The program should include member functions to 1) get the student’s test scores, 2) calculate the average of the test scores, and 3) display the results as follows: Test scores for Mary: 100 90...
C ++ . In professor Maximillian’s course, each student takes four exams. A student’s letter grade is determined by first calculating her weighted average as follows: (score1 + score2 + score3 + score4 + max_score) weighted_average = ----------------------------------------------------------------------- 5 This counts her maximum score twice as much as each of the other scores. Her letter grade is then a A if weighted average is at least 90, a B if weighted average is at least 80...
[JAVA/chapter 7] Assignment: Write a program to process scores for a set of students. Arrays and methods must be used for this program. Process: •Read the number of students in a class. Make sure that the user enters 1 or more students. •Create an array with the number of students entered by the user. •Then, read the name and the test score for each student. •Calculate the best or highest score. •Then, Calculate letter grades based on the following criteria:...
Write python code on computer, No handwritten
code
You will implement a program which asks the user to enter scores of different courses in different semesters. The program should read the input and output some simple statistics 1. An example input string by the user is given below. Fal12016-coursel:82, course2:80,course3:85;Spring2018- course4:82;Fall2018-course5:85, course6:50, course7:78 Info from different semesters are separated by a ";", courses in each semester are separated by a,and score and corresponding course is separated by a, information of...
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...
Write a program called printGPA. The program should contain at least 3 methods: main, gradeAverage, and letterGrade. The user will type a line of input containing the student's name, then a number that represents the number of scores, followed by that many integer scores (user input is in bold below). The data type used for the input should be one of the primitive integer data types. Here are two example dialogues: Enter a student record: Maria 5 72 91 84...
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:-...