Create a text file that contains ten Person objects Solved

30.00 $

Categories: ,
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

5/5 - (1 vote)

Create a text file that contains ten Person objects where each object is represented on a separate line with each attribute separated by a comma. Create a method that reads from the file, creates one Person object per line, and stores the object in an ArrayList object. Write the stored sorted objects by last name and display last name and first name to the console. For example, Salisbury, Robert.

The teaacher wants us to create this text file in the program itself by using file input commands within the program. The characateristics of the text file is from the previous person file we used before, which are these characterisitics: first name, last name, age, gender , social securtiy number. He wants the output to console to display last name first, then first name. For that to happen, he wants the arraylist to do a sort, so as to display the output correctly. Also, when we create the file, call it persons.text and save it to : c:/temp. file exceptions should also be in this program.

  • Persons.zip