Question: In this program, you will read in records from blood donors in a file, sort them based on one of the fields of the records


In this program, you will read in records from blood donors in a file, sort them based on one of the fields of the records using Java's built-in sorting routines, and then write the sorted list to the console as a table Your program must include the following elements: 1. A class called "BloodDonor to hold a donor's information 2. Different comparators to compare the different attributes of donors. Blood donor records will be specified in a file, one record per line. Each line of the file will have five comma-separated fields with no spaces between them (this is called a csv file). The fields will be: idNum lastName, firstName, type donation ime An example file is shown below: 74, Corvinas, Alexander A+,18.1 1011,Intervenus, Lestat,O-, 18.2 1111, Swan Bella B 11.5 1 The First The program must take two pieces of input, either as command line arguments, or by prompting the user for input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
