#include "Man.h" Man::Man(const string& newName, const string& newAddress, const string& newEmail, const string& newTel) { name = new string(newName); address = new string(newAddress); email = new string(newEmail); tel = new string(newTel); } Man::Man(const Man& m) { name = new string(*m.name); address = new string(*m.address); email = new string(*m.email); tel = new string(*m.tel); } Man::~Man() { delete name; delete address; delete email; delete tel; } string Man::toString() const { string newName = string("À̸§: ") + (*name); string newAddress = string("ÁÖ¼Ò: ") + (*address); string newEmail = string("À̸ÞÀÏ: ") + (*email); string newTel = string("ÀüÈ­¹øÈ£: ") + (*tel); return newName + newAddress + newEmail + newTel; } ostream& operator<<(ostream& out, const Man& m) { out << m.toString(); return out; } Man& Man::operator=(const Man& m) { delete name; delete address; delete email; delete tel; this->name = new string(*m.name); this->address = new string(*m.address); this->email = new string(*m.email); this->tel = new string(*m.tel); return *this; } void Man::setName(const string& newName) { delete name; name = new string(newName); } void Man::setAddress(const string& newAddress) { delete address; address = new string(newAddress); } void Man::setEmail(const string& newEmail) { delete email; email = new string(newEmail); } void Man::setTel(const string& newTel) { delete tel; tel = new string(newTel); } string Man::getName() const { return *name; } string Man::getAddress() const { return *address; } string Man::getEmail() const { return *email; } string Man::getTel() const { return *tel; }