3. Complete the program Student Records that simulates a student records system. The program reads a list of student ids, names, and GPAs from a file exam.txt, and stores the information in parallel array lists ids, names, and gpas.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section: Chapter Questions
Problem 8PP: (Data processing) A bank’s customer records are to be stored in a file and read into a set of arrays...
icon
Related questions
Question
3. Complete the program Student Records that simulates a student records system. The
program reads a list of student ids, names, and GPAS from a file exam.txt, and stores the
information in parallel array lists ids, names, and gpas.
Sample input (exam.txt):
132 Woody 4.1
465 Buzz 3.1
443 Rex 2.8
124 Hamm 3.3
337 Jessie 4.2
Your program will display a GPA report.
You must include a method named reportByGPA (...) that accepts the required array lists
and minimum GPA and displays the list of students that meet the criteria.
Sample output:
Enter the minimum GPA:
4.0
Students with GPA of 4.0 or higher
132 Woody, GPA: 4.1
337 Jessie, GPA: 4.2
end of program
import java.util.ArrayList;
import java.util.Scanner;
import java.io.File;
import java.io.FileNotFoundException;
public class Student Records {
public static void main(String[] args) throws
FileNotFoundException (
Scanner f = new Scanner (new File ("exam.txt"));
Scanner kb = new Scanner (System.in);
ArrayList<Integer> ids = new ArrayList<> ();
ArrayList<String> names = new ArrayList<> ();
ArrayList<Integer> gpas = new ArrayList<> ();
Transcribed Image Text:3. Complete the program Student Records that simulates a student records system. The program reads a list of student ids, names, and GPAS from a file exam.txt, and stores the information in parallel array lists ids, names, and gpas. Sample input (exam.txt): 132 Woody 4.1 465 Buzz 3.1 443 Rex 2.8 124 Hamm 3.3 337 Jessie 4.2 Your program will display a GPA report. You must include a method named reportByGPA (...) that accepts the required array lists and minimum GPA and displays the list of students that meet the criteria. Sample output: Enter the minimum GPA: 4.0 Students with GPA of 4.0 or higher 132 Woody, GPA: 4.1 337 Jessie, GPA: 4.2 end of program import java.util.ArrayList; import java.util.Scanner; import java.io.File; import java.io.FileNotFoundException; public class Student Records { public static void main(String[] args) throws FileNotFoundException ( Scanner f = new Scanner (new File ("exam.txt")); Scanner kb = new Scanner (System.in); ArrayList<Integer> ids = new ArrayList<> (); ArrayList<String> names = new ArrayList<> (); ArrayList<Integer> gpas = new ArrayList<> ();
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Concept of pointer parameter
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning