Course Solutions Uncategorized (Solved) : Given Codes Import Javautilscanner Import Javaio Public Class Assignment Static Scanner Ne Q36572508 . . . .

(Solved) : Given Codes Import Javautilscanner Import Javaio Public Class Assignment Static Scanner Ne Q36572508 . . . .

 

Your assignment is to write a grade book for a teacher. The teacher has a text file, which includes students names, and stud

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

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post