

Given codes
——————————————————–
import java.util.Scanner;
import java.io.*;
public class Assignment
{
static Scanner in = new Scanner(System.in);
public static void main (String[] args) throws IOException
{
String command = ” “;
System.out.print(“Please enter the filename: “);
String fileName = in.nextLine();
GradeBook grades = new GradeBook(fileName);
while (command.charAt(0) != ‘q’) {
System.out.println();
System.out.print(“Please enter a command or type “?” to seethe
menu: “);
command = in.nextLine();
switch (command.charAt(0)) {
case ‘a’: // display all
System.out.println(grades.toString());
break;
case ‘b’ : // search
System.out.print(“Type student name: “);
String name = in.nextLine();
int index = grades.getIndex(name);
char grade = grades.getLetterGrade(index);
if
PayPal Gateway not configured
PayPal Gateway not configured