Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a grading program for an instructor whose course has the following polices

ID: 3807655 • Letter: W

Question

Write a grading program for an instructor whose course has the following polices: Two quizzes, each graded on the basis of 10 point, are given. One midterm exam and final exam, each graded on the basis of 100 points, are given. 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 for 25 percent. Any grade of 90 percent or more is an A, any between 80 percent is a B, any grade between 70 and 79 percent is a C, any grade between 60 and 69 percent D, and any grade below 60 percent is an F. The program should read in the student's scores and display the student's record, which consists of two quiz scores, two exam scores, the student's final percent score for the entire course, and the final letter grade. Use methods to calculate: the course percent grade public static double percentGrade(double num1, double num2, double num3) the course letter grade public static void letterGrade(double num1)

Explanation / Answer

This is Student Class:

//This is Student class
package com.studentScoreGrading;

public class Student {

   String name;
   int id;
   static double sum=0;
   double num1;
   double num2;
   double num3;
   //double avg=0.0;
   public Student(){
      
   }
public Student(String name,int id){
this.name=name;
this.id=id;

}
public void getDisplay(){
   System.out.println("Student Name is: "+name);
    System.out.println("Student Id is: "+id);
    System.out.println("Student grades in lette is: "+letterGrade(num1));
    if((sum>=90)){
        System.out.println("Student having grade A: "+sum);
       
    }else if((sum>=89)&&(sum<=80)){
        System.out.println("Student having grade B: "+sum);
       
    }else if((sum>=79)&&(sum<=70)){
        System.out.println("Student having grade C: "+sum);
       
    }else if((sum>=69)&&(sum<=60)){
        System.out.println("Student having grade D: "+sum);
       
    }else{
        System.out.println("Student having very low grade: "+sum);
       
    }
}
  
  
public static double percentGrade(double num1,double num2,double num3){
   sum=num1+num2+num3;
   return sum;
  
}
  
public static double letterGrade(double num1){
   return num1;
}
  
  
}
  

This is a Driver class:

package com.studentScoreGrading;

import java.util.ArrayList;
import java.util.Scanner;

public class StudentTest1 {

   public static void main(String[] args) {
       // TODO Auto-generated method stub

       ArrayList<Student> al=new ArrayList<Student>();
       Student s=null;
       Scanner sc=new Scanner(System.in);
       System.out.println(" Student Grading Operations ");
System.out.println("Enter A to Add Student");
System.out.println("Enter B to Enter Test Grade");
System.out.println("Enter C to Display Result");
System.out.println("Enter D to Exit");
       while(true){
           System.out.print("Enter your choice [A,B,C & D]: ");
  
   String choice = sc.next();
   switch (choice)
   {
   case "A" :

                   System.out.print("Enter the Student Name: ");
                   String name=sc.next();
                   System.out.print("Enter the Student Id: ");
                   int id=sc.nextInt();
                   s=new Student(name,id);
                   al.add(s);
   break;
   case "B" :
       System.out.print("Enter Final exam grade value Grading must be between 1 to 50: ");
                   double num1 =sc.nextDouble();
                   Student.letterGrade(num1);
                   System.out.print("Enter Mid Term grade value Grading between 1 to 25: ");
                   double num2 =sc.nextDouble();
                   System.out.print("Enter Quizzes Test grade value Grading between 1 to 25: ");
                   double num3 =sc.nextDouble();
                   Student.percentGrade(num1, num2, num3);
                  
                  
   break;
     
   case "C" :
       for(Student stu:al){
           stu.getDisplay();
       }
      
   break;
     
   case "D" :
       System.out.println("Bye....THANK YOU");
   System.exit(0);
     
   break;
  
   default :
   System.out.println("Wrong Entry ");
   break;   
   }
          
   }
   }

}

Output:


Student Grading Operations

Enter A to Add Student
Enter B to Enter Test Grade
Enter C to Display Result
Enter D to Exit
Enter your choice [A,B,C & D]: A
Enter the Student Name: AAA
Enter the Student Id: 11
Enter your choice [A,B,C & D]: B
Enter Final exam grade value Grading must be between 1 to 50: 45
Enter Mid Term grade value Grading between 1 to 25: 25
Enter Quizzes Test grade value Grading between 1 to 25: 20
Enter your choice [A,B,C & D]: C
Student Name is: AAA
Student Id is: 11
Student grades in lette is: 20
Student having grade A: 90.0
Enter your choice [A,B,C & D]: D
Bye....THANK YOU

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote