1: //Person.cpp 2: 3: #include <iostream> 4: #include <string> 5: using namespace std; 6: 7: #include "Person.h" 8: 9: void Person::setName 10: ( 11: const string& theName // 12: ) 13: { 14: name = theName; 15: } 16: 17: void Person::setAge 18: ( 19: int theAge // 20: ) 21: { 22: age = theAge; 23: } 24: 25: string Person::getName() const 26: { 27: return name; 28: } 29: 30: int Person::getAge() 31: { 32: return age; 33: } 34: 35: void Person::show() 36: { 37: cout << "\nName: " << name; 38: cout << "\nAge: " << age; 39: cout << endl; 40: } 41: