Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Add to class Person copy constructor overloaded = operator destructor I need hel

ID: 3762156 • Letter: A

Question

Add to class Person

copy constructor

overloaded = operator

destructor

I need help in figuring out how to complete these tasks since I'm really confused as to what needs to be done. I need help with this tonight since this is an assignment. If anyone can help that would be appreciated.

Thanks.

//Person class demo
//Person.h - interface

#include
#include
#include "Date.cpp"

using namespace std;

class Person
{
public:
Person();
Person(string, int, Date);
string getName();
int getAge();
void setName(string newName);
void setAge(int newAge);
Date* getBirthDate();
void setBirthDate(Date);
void display();

//private:
string name;
int age;
Date* birthDate;
};

Explanation / Answer

#include<iostream>

#include<string.h>

#include "Date.cpp"

using namespace std;

class Person

{

public:

Person();

Person(string, int, Date);

string getName();

int getAge();

void setName(string newName);

void setAge(int newAge);

Date* getBirthDate();

void setBirthDate(Date);

void display();

//private:

string name;

int age;

Date* birthDate;

  

Person(Person&);

void operator=(Person&);

~Person();

};

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote