Question Details

(Solved) Write a C++ program that keeps track of an array of Person


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.








1. C++ Syntax / Arrays (40%)

 

2. C++ Functions and Pointers (15%)

 

3. C++ Looping and Decision Structures (20%)

 

4. C++ Input and Output Handling (20%)

 

5. Error Handling (5%)

 

Do read and follow EACH and EVERY Instruction the Course Developers have stated

 

relevant to the WK5 assignment.

 

For clarity as well as prevention of anomalies, use EXACTLY the TEST DATA the

 

Instructions present PLUS Your Own Name!!!!

 

That makes 3 total records.

 

Example:

 

Doe, Jane

 

Smith, John

 

Your, Name

 


 

 


Solution details:

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
SiteLock

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

Oct 15, 2019

EXPERT

Tutor

ANSWER RATING

YES, THIS IS LEGAL

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • As a reference for in-depth understanding of the subject.
  • As a source of ideas / reasoning for your own research (if properly referenced)
  • For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).
This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

NEW ASSIGNMENT HELP?

Order New Solution. Quick Turnaround

Click on the button below in order to Order for a New, Original and High-Quality Essay Solutions. New orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.

WE GUARANTEE, THAT YOUR PAPER WILL BE WRITTEN FROM SCRATCH AND WITHIN A DEADLINE.

Order Now