Write a C++ program that keeps track of an array
Need help with this assignment
Write a C++ program that keeps track of an array of Person objects and handles basic commands.
The Person object contains the following fields:
- FirstName { string }
- LastName { string }
INSERTÂ - inserts a Person into the array based on user input, sorts the array by last name, and prints out all of the entries in the array. (Format: INSERT - LastName, FirstName)
- If a given Person already exists in the array, then the program will return an error message to the user.
- If the user input does not follow the LastName, FirstName format, then the program will return an error message to the user.
Example:
Input - INSERT - Smith, John
Output
Doe, Jane
Smith, John
VIEWÂ - prints out the current array. (Format: VIEW)
Example:
Input - VIEW                              Â
Output
Doe, Jane
Smith, John
DELETEÂ - deletes a person from the array based on user input, sorts the array, and prints out all of the entries in the new array. (Format: DELETE - LastName, FirstName)
- If the Person to be deleted from the array does not exist in the array, then the program will return an error message to the user.
- If the user input does not follow the LastName, FirstName format, then the program will return an error message to the user.
Example:
Input - DELETE - Smith, John   Â
Output
Doe, Jane
Utilize functions, loops, and pointers where applicable, and remember to include error handling to let the user know if something went wrong during your program.
Answers
Status NEW
Posted 18 May 2017 02:05 AM
My Price 9.00
-----------
Attachments
file 1495076128-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am
-----------
Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------.
-----------
Th-----------ank----------- yo-----------u
-----------
Not Rated(0)