Question
Write a console application to accomplish the following tasks. IN C#, AGAIN IN C#, Write a class Person with attributes for first name, last name
Write a console application to accomplish the following tasks. IN C#, AGAIN IN C#, Write a class Person with attributes for first name, last name and age. The class should, at a minimum, also implement the IComparable interface and override the ToString method. Include exception handling for file not found and format errors.
http://ksuweb.kennesaw.edu/~rgesick1/cse%201302c/hw_1302/inputName.txt
This is the link for the text file you must open to see inputName.txt for the assignment I will leave a photo of what it contains below (CANNOT USE SYSTEM .LINQ) ^
Read a list of names from a text file, inputName.txt. The names are formatted as first_name,last_name,age one person per line. For example:
David,Smith,19
Russell,Jones,16
Andrew,Jones,16
Arrange them in order with age as the primary key( descending order), last name as the secondary key(ascending (alphabetical) order), with the tertiary key being first name(ascending (alphabetical) order). For example:
Smith David 19
Jones Andrew 16
Jones Russell 16
Write the sorted data to another file, nameOutput.txt. The names are written as one person per row in last_name first_name age structure. For example:
Smith David 19
Jones Andrew 16
Jones Russell 16
* I AM LEAVING A PICTURE TO THE TEXT FILE JUST INCASE YOU CAN'T OPEN IT*
Adam,Mallanda, 23 Hal, Callsen, 19 Ben, Eckle, 19 Jenny, Simmons,20 Jason, Sperry, 20 Brad, Hornsby, 19 Brad, Chai,18 Zeus, Bronson, 19 Gery, Flynn, 20 Lisa, White, 21 Steve, Clinton, 20 Becca, Seely, 22 April,Wetzel,18 Zeus, Eckle, 19 Larry, Bowman, 19 Dale, Horner,21 Joseph, Bond, 20 April, Becker, 16 Brian, Beshore, 22 Jonathon, Beshore, 22 Adam, Eckle,19 Adrian, Beshore, 22Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started