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

I would like for you to create a class to register and assign grades to a studen

ID: 3867336 • Letter: I

Question

I would like for you to create a class to register and assign grades to a student. You can use the bank account example as a template. You will need a constructor class to create a student. You will need a mutator class to set a grade (like in the Die class) You will need a getter class to return the grade for a student. Then you will need to write a main method to create two students, assign them grades, and then print the students names and grades to the screen.

Explanation / Answer

import java.util.Scanner; public class CaseGrade { public static void main(String[] args) { Scanner input = new Scanner (System.in); String name ; int grade; String exellent = "Exellent :"; String veryGgood ="Very Good :"; String good="Good :"; String pass ="Pass :"; String fail = "Fail :"; int max = 0; int min = 100; int sum = 0; int avg ; int counter =0; boolean repeat ; while (repeat =true) { System.out.println("Enter Name : "); name = input.next(); System.out.println("Enter Grade : "); grade = input.nextInt(); if (grade == -1 ) { avg = sum / counter; System.out.println(" result = :"); System.out.println(exellent +" "+ veryGgood +" "+ good +" "+ pass +" "+fail); System.out.println("maximum = "+ max +" "); System.out.println("minimum = "+ min +" "); System.out.println(" Average = " +avg); System.exit(0); } switch (grade/10) { case 100: case 9 : exellent += " "+ name + " " +grade+" "; break; case 8 : veryGgood += " " + name + " " +grade +" "; break ; case 7 : good += " " + name + " " +grade +" "; break; case 6: case 5: pass += " " + name + " " +grade +" "; break; default: fail +=" " + name + " " +grade +" "; break; } sum = sum + grade; counter = counter + 1; if (grade > max) { max = grade; } if (grade