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 18:10
If a particle moves along a path such that r : (3 sin t) m and ? : 2t rad, where t is in seconds. what is the particle's acceleration in m/s in 4 seconds? a)- 16.43 b)- 16.29 c)- 15.21 d)- 13.79
Answers: 1
question
Engineering, 04.07.2019 18:10
The higher the astm grain size number, the finer the gran is. a)-true b)-false
Answers: 2
question
Engineering, 04.07.2019 18:10
Aturning operation is performed with following conditions: rake angle of 12°, a feed of 0.35 mm/rev, and a depth of cut of 1.1 mm. the work piece is aluminum alloy 6061 with t6 heat treatment (a16061-t6). the resultant chip thickness was measured to be 1.0 mm. estimate the cutting force, fc. use shear stress of 207 mpa and coefficient of friction on the tool face of 0.6.
Answers: 1
question
Engineering, 04.07.2019 18:20
Refrigerant-134a enters the compressor of a refrigerator as superheated vapor at 0.14 mpa and -10°c at a rate of 0.05 ka/s and leaves at 0.8 mpa and 50°c. the refrigerant is cooied in the condenser to 0.72 mpa and 26'c. it is then throttled to 0.15 mpa. sketch the t-s diagram for the system and evaluate: 6) the rate of heat removai from the refrigerated space (kw), it) the power input to the compressor (kw), ii) the isentropic efficiency of the compressor (%), and iv) the cop of the refrigerator.
Answers: 2
You know the right answer?
Please add comments to your program to explain it. Thank you!

In this assignment, you wi...
Questions
question
Mathematics, 13.10.2020 21:01
question
Mathematics, 13.10.2020 21:01
question
English, 13.10.2020 21:01
question
Mathematics, 13.10.2020 21:01
Questions on the website: 13722361