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, 03.07.2019 14:10
The y form of iron is known as: a) ferrite b) cementite c) perlite d) austenite
Answers: 3
question
Engineering, 04.07.2019 18:10
What difference(s) did you notice using a pneumatic circuit over hydraulic circuit.explain why the pneumatic piston stumbles when it hits an obstacle.
Answers: 2
question
Engineering, 04.07.2019 18:10
Apump is used to circulate hot water in a home heating system. water enters the well-insulated pump operating at steady state at a rate of 0.42 gal/min. the inlet pressure and temperature are 14.7 lbf/in.2, and 180°f, respectively; at the exit the pressure is 60 lbf/in.2 the pump requires 1/15 hp of power input. water can be modeled as an incompressible substance with constant density of 60.58 lb/ft3 and constant specific heat of 1 btu/lb or. neglecting kinetic and potential energy effects, determine the temperature change, in °r, as the water flows through the pump.
Answers: 1
question
Engineering, 04.07.2019 18:10
The higher the astm grain-size number, the coarser the grain is. a)-true b)-false
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
English, 11.03.2022 04:40
question
Mathematics, 11.03.2022 04:40
Questions on the website: 13722361