#include #include #include using std::cout; using std::endl; using std::string; //using namespace std; class Customer { private: string firstname; string lastname; int id; public: Customer(string first, string last, int ID);//constructor ~Customer(); //destructor string getName(); void SetName(string first, string second); }; Customer::Customer(string first, string last, int ID) { cout << "Constructing the object with id " << ID << endl; firstname = first; lastname = last; id = ID; } Customer::~Customer() { cout << "Destructing the object with id " << id << endl; } string Customer::getName() { return firstname + " " + lastname;} void Customer::SetName(string first, string last) { firstname = first; lastname = last; } int main() { //Customer c1; //Customer c2; Customer c1("Kate", "Brown", 1); { Customer c2("John", "Lewis", 2); } Customer c3("James", "Bond",3); cout << c1.getName() << endl; cout << c3.getName() << endl; // c1.SetName("Kate", "Brown"); // c2.SetName("John", "Lewis"); return 0; }