Question: Consider a file that contains student grades such as the following: table [ [ Jane Lee, 1 0 0 ] , [ Aaron X

Consider a file that contains student grades such as the following:
\table[[Jane Lee,100],[Aaron X. Schmidt,37],[Frank von Tardy,2]]
As with the country names, the student names don't have a fixed number of words. To process the input, read one line of input at a time from the given scanner in, then scan the line with another scanner. Add all but the last word from the line to the name, and set the grade to the last word.
How to use this tool
Unused
else
}
{
grade = next;
}
if (lineScanner. hasNext())
String next = lineScanner * next ();
name = name substring(1); // Remove initial space
process (name, grade) ;
while (lineScanner. hasNext())
{
1
name = name +*+ next;
}
StudentGrades.java
Load default template...
import java.util.scanner;
public class StudentGrades
{
public static void process(String name, String grade)
f
System.out.println(name +": "+ grade);
}
public static void main(String[] args)
{
Scanner in = new Scanner(
System.in);
while (in.hasNextline())
{
}
}
}
 Consider a file that contains student grades such as the following:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!