subject
Engineering, 07.03.2020 05:41 bgcxz

Please add comments to your program to explain it. Thank you!

In this assignment, you will create a Java program to read undergraduate and graduate students from an input file, sort them, and write them to an output file.

1. The input file name and the output file name are passed in as the first and second arguments at command line, respectively. For example, assume your package name is FuAssignment5 and your main class name is FuMain, and your executable files are in "C:\Users\2734848\eclipse-workspace \CIS 265 Assignments\bin". The following command line will read from a local file "students. txt" and write to a local file "students_sorted. txt": C:\Users\2734848\eclipse-workspace\ CIS 265 Assignments\bin > java FuAssignment5.FuMain students. txt students_sorted. txt

2. If the program is run with incorrect number of arguments, your program must print an error message and exit. The error message must show correct format to run your program, e. g., "Usage: FuAssignment5.FuMain input_file output_file" where FuAssignment5 is the package and FuMain is the main class.

3. Each line in the input file represents a student. There are 5 fields in each line: name, id, gpa, "graduate" or "undergraduate", isTransfer (for undergraduate) or college (for graduate). The fields are separated by comma, ",". For example, the input file students. txt file may contain: Michelle Chang,200224,3.3,graduate, Cleveland State University Tayer Smoke,249843,2.4,undergraduate, false David Jones,265334,2.7,undergraduate, true Abby Wasch,294830,3.6,graduate, West Virginia

4. The program will read the lines and create undergraduate students or graduate students accordingly. The students are added to an ArrayList.

5. The program then sort the students in ArrayList in ascending order of their id.

6. The sorted list of students is written to the output file.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 16:10
The force on a cutting tool are 2600n vertically downward and 2100 horizontal. determine the resultant force acting on the tool and the angle at which it acts.
Answers: 1
question
Engineering, 04.07.2019 18:20
Vibration monitoring this technique uses the noise or vibration created by mechanical equipment and in seme cases by plant systems to detemine their actual condtion. a)- true b)- false
Answers: 2
question
Engineering, 06.07.2019 03:30
Give three differences between corrosion of metals and the corrosion of ceramics? what is static fatigue?
Answers: 1
question
Engineering, 06.07.2019 04:20
Aflow moves in the x direction with a velocity of 10 m/s from 0 to 0.1 second and then reverses direction with the same speed from 0.1 to 0.2 second. sketch the pathline strating from x-0 and the streak! ine with dye introduced at x=0. show the streamlines for the first time interval and the second time interval.
Answers: 3
You know the right answer?
Please add comments to your program to explain it. Thank you!

In this assignment, you wi...
Questions
question
Mathematics, 30.03.2020 16:52
question
Mathematics, 30.03.2020 16:52
question
Mathematics, 30.03.2020 16:52
Questions on the website: 13722363