help me to get the following output: (you need to modifycontact.cpp & contact.h)
Output:
John Doe
John Doe
(+1) 416 123-4567
(+1) 416 234-5678
(+1) 416 345-6789
(+11) 416 456-7890
Testing! Please wait:
…………………………………………..
…………………………………………..
…………………………………………..
…………………………………………..
…………………………………………..
…………………………………………..
…………………………………………..
…………………………………………..
…………………………………………..
…………………………………………..
John Doe
(+1) 416 123-4567
(+1) 416 234-5678
(+1) 416 345-6789
(+11) 416 456-7890
main.cpp
#include <iostream>
#include “Contact.h”
using namespace std;
using namespace communication;
int main() {
communication::Contact theContact(“John Doe”, nullptr,0);
theContact.addPhoneNumber(14161234567);
theContact.addPhoneNumber(14162345678);
theContact.addPhoneNumber(14163456789);
theContact.addPhoneNumber(114164567890);
theContact.display();
cout << endl << “Testing! Please wait:” <<endl;
for (int i = 1; i <=5000000; i++)
{
Contact temp = theContact;
theContact = temp;
theContact = theContact;
if (!(i % 10000))
cout << “.”;
if (!(i % 500000))
cout << endl;
}
cout << endl;
theContact.display();
return 0;
}
Contact.h
#ifndef CONTACT_H__
#define CONTACT_H__
// TODO: add namespace here
namespace communication {
class Contact
{
char m_name[21];
long long* m_phoneNumbers;
PayPal Gateway not configured
PayPal Gateway not configured