Code /* * testPerson.cpp * CIS 250 * David Klick * 2005-02-21 * * Demonstration of classes, constructors, constructor * overloading, accessor and mutator methods, static * and constant data members, dynamic memory alloaction, * and destructors. */ #include #include "person.h" using std::cout; using std::endl; int main(void) { cout << "Number of objects: " << person::getCount() << endl; person p1; cout << "Number of objects: " << person::getCount() << endl; cout << p1.getName() << ' ' << p1.getSSN() << ' ' << p1.getGender() << ' ' << p1.getAge() << endl; person p2("Dave Klick", 123098765, 'm', -19); cout << p2.getName() << ' ' << p2.getSSN() << ' ' << p2.getGender() << ' ' << p2.getAge() << endl; cout << "Number of objects: " << person::getCount() << endl; return 0; } /* Sample output: Number of objects: 0 Number of objects: 1 0 M 0 Dave Klick 123098765 M 0 Number of objects: 2 */