Write c++ program- keeps track of an array of person objects

Assignment Help C/C++ Programming
Reference no: EM131081867

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)

Example:

Input - DELETE - Smith, John
Output
Doe, Jane

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.

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.

Reference no: EM131081867

Questions Cloud

Shareholder theory versus stakeholder theory : Explain the basics of stakeholder theory as if you are talking to a friend. Should a corporation care about the interests of people other than shareholders? How would a corporation behave differently if it accepted a shareholder theory versus a stake..
Social media usage differences around the world : Can you find the services that are most popular in Russia and Middle Eastern countries? Based on the information you find, what can you conclude about social media usage differences around the world?
Describing individuals socioeconomic status : America is stratified into levels describing individuals’ socioeconomic status: upper class, middle class, working class, and the poor. Describe characteristics of each class and, when appropriate, the sub-classes.
Calculate the compound growth rate in sales and earnings : Develop some additional financial data which will further illustrate the companys condition - calculate the compound growth rate in sales and earnings for the company.
Write c++ program- keeps track of an array of person objects : Write a C++ program that keeps track of an array of Person objects and handles basic commands.
Would you like to play this game every day : Would you like to play this game every day?
Consumer prepurchase expectations : The disconfirmation paradigm is used to study two variables: consumer prepurchase expectations and _____. A. consumer behaviors related to the buying process B. decision-making roles within the purchase process C. the relationship between product kno..
Searching textual documents : Your company has been hired to design a product that will provide searches of textual documents and database querying. Your design team has not developed a product like this before.
Understate productive contributions of women relative to men : GDP does not count productive services, such as child care, food preparation, cleaning, and laundry, provided within the household. Why are these things excluded? Is GDP a sexist measure? Does it understate the productive contributions of women relat..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Explain initialize variables counting the lines and letters

If the output file cannot open, exit the program. Initialize variables counting the lines and letters. Write a program that reads a given text file, outputs the text file as is, and also prints the number of lines and the number of times each lette..

  Evaluate effectiveness of simple branch prediction schemes

You need to explore the effectiveness of branch direction prediction (taken vs not taken) using an actual program. Your task is to use the given branch prediction simulation infrastructure to evaluate the effectiveness of some simple branch predic..

  Have to write a small program that prompts the user to

have to write a small program that prompts the user to enter a temperature in degrees fahrenheit and then prints a

  Write program that reads one line of text and then prints it

Write a program that reads one line of text and then prints it with all its blanks removed. Write a program that reads one line of text and then prints the number of words that were read.

  Define how stack template works

Even though the program runs correctly, there is a memory problem somewhere in the program and I can't figure out what I have done wrong.

  Question 1 create an object oriented application with c

question 1 create an object oriented application with c that computes the area of a rectangle and the area and the

  Calculate the gross pay of a set of employees

Write a C program that will calculate the gross pay of a set of employees - Calculate and print the total sum of Wage, Hours, Overtime, and Gross values

  Program to prove that the definition of o-notation holds.

To prove this we need to prove that the definition of o-notation holds.

  Creating a database design in visior

Use "Appendix A: Designing Databases with Visio Professional: A Tutorial," to help you complete Section 1: Visio Database Design. (Note: This tutorial focuses on the use of Microsoft Visio. Open source applications are not covered in Appendix A..

  Create a permutation generator script for us

create a permutation generator script for us that will generate all the permutations possible from a set of words. The script can be written in PHP, jscript, Python or Java.

  Create a c++ project using appropriate data types

Create a C++ project. Declare the following identifiers using appropriate data types.

  How do you access the memory address of a variable

How do you access the memory address of a variable? How do you access the contents of the memory location whose address is stored in a pointer variable?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd