Question: Attached is a data file containing student information named Students.txt. The info includes a first name, phone number, email and gpa (separated by comma). You
Attached is a data file containing student information named Students.txt. The info includes a first name, phone number, email and gpa (separated by comma). You must write a program, using file handling techniques from Chapter 18 of the textbook, that:
1.) adds Steven, a transfer student, in the end with a 4.0 gpa and any phone number and email address to the file; (15 points)
2.) reads all of the lines and store them in a String array (35 points)
3.) shows how many students have a 3.0 gpa or higher (20 points)
4.) shows how many students do not have an email account (15 points)
5.) shows the average gpa of all students (15 points)
Hints:
1) All the lines can be stored in a String array
2) Each line can be spitted by using:
String[] values = line.split(",") ;
3) The following shows how to convert from String to double
double gpa = Double.parseDouble(gpaString);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
