Reading from and Writing to Text Files Write a program that will read in a file
ID: 3568724 • Letter: R
Question
Reading from and Writing to Text Files
Write a program that will read in a file of student academic credit data and create a list of students on academic
warning. The list of students on warning will be written to a file. Each line of the input file will contain the
student name (a single String with no spaces), the number of semester hours earned (an integer), the total
quality points earned (a double). The following shows part of a typical data file:
Smith 27 83.7
Jones 21 28.35
Walker 96 182.4
Doe 60 150
The program should compute the GPA (grade point or quality point average) for each student (the total quality
points divided by the number of semester hours) then write the student information to the output file if that
student should be put on academic warning. A student will be on warning if he/she has a GPA less than 1.5 for
students with fewer than 30 semester hours credit, 1.75 for students with fewer than 60 semester hours credit,
and 2.0 for all other students. The file Warning.java contains a skeleton of the program. Do the following:
1. Set up a Scanner object scan from the input file and a PrintWriter outFile to the output file inside the try
clause (see the comments in the program). Note that you
Explanation / Answer
contact on timacs12@gmail.com
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.