The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Java Programming
Lab 6 Files
Â
Purpose
Purpose is to practice using file input and output, and array list of objects. Also, this
document tells you only what to do, you now have more responsibility to design how to
do it.
Â
Problem description
You are given a text file called 'Students.txt' that contains information on many
students. Your program reads the file, creating many Student objects, all of which will
be stored into an array list of Student objects, in the Students class. The Tester class
controls everything, calling many Students class methods to produce lots of different
outputs. The program must write the output to an output file and to the Terminal
Window.
Â
File and class specifications
Students.txt file format
Information for each student is stored in the file as 3 lines of text:
name
age
GPA
e.g. the following shows data for two students:
Name0
22
1.2
Name1
22
2.71
Â
Student class
The Student class has instance variables and methods to represent one single student.
Â
Your Student class must have exactly and only the following instance variables:
private String name;
private int age;
private double gpa;
Â
Â
© Anthony W. Smith, 2016CSCI 114 Programming Fundamentals IILab 6 Files1Lab 6 FilesPurposePurpose is to practice using file input and output, and array list of objects.Also, thisdocument tells you only what to do, you now have more responsibility to design how todo it.Problem descriptionYou are given a text file called 'Students.txt' that contains information on manystudents.Your program reads the file, creating manyStudentobjects, all of which willbe stored into an array list ofStudentobjects, in theStudentsclass.TheTesterclasscontrols everything, calling manyStudentsclass methods to produce lots of differentoutputs.The program must write the output to an output file and to the TerminalWindow.File and class specificationsStudents.txtfile formatInformation for each student is stored in the file as 3 lines of text:nameageGPAe.g. the following shows data for two students:Name0221.2Name1222.71StudentclassTheStudentclass has instance variables and methods to represent one single student.YourStudentclass must have exactly and only the following instance variables:private String name;private int age;private double gpa;
Attachments:
-----------