Question: C++ Programming Help Needed (3) files listed in Body with JPEG output. Purpose: Implement the simple Contact management application as a Windows console application. Requirements:
C++ Programming Help Needed (3) files listed in Body with JPEG output.
Purpose: Implement the simple Contact management application as a Windows console application. Requirements: You are provided with three source files. Implement your code per below instructions for each file: ContactRecord.h - This header file contains the class definition of the ContactRecord class. You need to provide the implementation for each of its member functions and constructors.
### #pragma once #include #include using namespace std; class ContactRecord { private: int ContactID; string FirstName; string LastName; string MiddleName; string PhoneNumber; private: void CopyData(const ContactRecord & src); public: int GetContactID() { return this->ContactID; } string GetFirstName() { return this->FirstName; } string GetLastName() { return this->LastName; } string GetMiddleName() { return this->MiddleName; } string GetPhoneNumber() { return this->PhoneNumber; } void SetContactID(int v) { this->ContactID = v;} void SetFirstName(string v) { this->FirstName = v; } void SetLastName(string v) { this->LastName = v; } void SetMiddleName(string v) { this->MiddleName = v; } void SetPhoneNumber(string v) { this->PhoneNumber = v; } public: void Print() const; public: ContactRecord(); ContactRecord(string firstName, string lastName, string middleName, string phoneNumber); ContactRecord(const ContactRecord & src); public: const ContactRecord & operator=(const ContactRecord & src); bool operator==(const ContactRecord & src); }; ###
ContactDataManager.h - This header file contains the class definition of the ContactDataManager class. The ContactDataManager class manages the list (vector) of ContactRecord objects. You need to provide the implementation for each of its member functions and constructors.
### #pragma once #include #include "ContactRecord.h" class ContactDataManager { private: static int NextContactID; private: vector ContactList; private: void CopyData(const ContactDataManager & src); public: ContactDataManager(); ContactDataManager(const ContactDataManager & src); public: size_t GetContactCount(); int AddContact(string firstName, string lastName, string middleName, string phoneNumber); bool EditContact(int nContactID, string firstName, string lastName, string middleName, string phoneNumber); bool RemoveContact(int nContactID); bool RetrieveContact(int nContactID, ContactRecord & contact); vector GetContactIDs(); public: const ContactDataManager operator=(const ContactDataManager & src); }; ###
Main.cpp - This source file contains the implementation of the main() method. Do not modify this file. Include it in your project. Your ContactRecord and ContactDataManager classes will need to work with this source file.
### #include "ContactRecord.h" #include "ContactDataManager.h" int main(int argc, char *argv[], char *envp[]) { ContactDataManager contactDataManager; contactDataManager.AddContact("Peter", "Nguyen", "", "123456789"); contactDataManager.AddContact("Kim", "Vo", "Hai", "987654321"); contactDataManager.AddContact("John", "Smith", "Jr.", "112233445566"); contactDataManager.AddContact("Hung", "Bach", "", "3344556677"); vector contactIds = contactDataManager.GetContactIDs(); cout
Output:

CADevelopment National University Courses iCSc300 Assignments-W1RolodexDebug Rolodex CADevelopmentiNational University Courses\CSC300 Assignments\HW1\Rolodex Debug lRolodex.exe ****CONTACTS BEFORE EDIT ID 1, Last Name: Nguyen, First Name: Peter, Middle Name: , Phone Number: 123456789 ID: 2, Last Name: Vo, First Name: Kim, Middle Name: Hai, Phone Number 987654321 ID: 3, Last Name: Smith, First Name: John, Middle Name: Jr., Phone Number: 112233445566 ID: 4, Last Name: Bach, First Name: Hung, Middle Name: , Phone Number: 3344556677 *CONTACTS AFTER EDIT** ID: 1, Last Name: Nguyen, First Name: Peter, Middle Name: S., Phone Number: 66666666 ID: 2, Last Name: Vo, First Name: Kim, Middle Name: Hai, Phone Number: 987654321 ID: 3, Last Name: Smith, First Name: John, Middle Name: r., Phone Number: 112233445566 ID: 4, Last Name: Bach, First Name: Hung, Middle Name: Phone Number: 3344556677 CONTACTS AFTER REMOVE ** ID: 1, Last Name: Nguyen, First Name: Peter, Middle Name: S., Phone Number: 66666666 ID: 3, Last Name: Smith, First Name: John, Middle Name: Jr., Phone Number: 112233445566 ID: 4, Last Name: Bach, First Name: Hung, Middle Name: , Phone Number: 3344556677