Create a data file that contains person information. The information will consis
ID: 666140 • Letter: C
Question
Create a data file that contains person information. The information will consist of a person’s name, age, and weight to the nearest tenth of a pound. Populate the file with 20 data records. Of the 20 records make 17 with unique data and 3 with duplicate data so that there are 3 sets of duplicate records and 14 records that are not duplicates of other records.
Read this file into an array that will contain 20 Person objects.
Create a second data file just like the first with 20 records and the same number of duplicates only make all the names different from the names in the first data file, except for two records such that there are two identical records found in each of the two data files.
Read this file into an ArrayList that will contain 20 Person objects.
Starting with the two data files read into your program as specified above, create a java program that is to remove all duplicates and merge the two sets of data to create a new data file containing the merged and unduplicated data sorted in reverse order by age. Your program will also print to the console the duplicate records that were identified in the process.
This process will require a Person class. Create a Person class that must have encapsulated data fields.
The class with the main method must be modularized with at least 2 static methods in addition to the main module.
Explanation / Answer
Can be in this way :
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.