/* Contestant Class Implementation */ #include #include "Contestant.h" using namespace std; /* Contestant member function setName(): * Input: * c_name - contestant’s Name * Process: * sets the member variable name = c_name * Output: * none */ void Contestant::setName(Name c_name) { name = c_name; return; } /* Contestant member function setPersonal_info(): * Input: * c_personal - contestant’s Personal_Info * Process: * sets the member variable personal = c_personal * Output: * none */ void Contestant::setPersonal_info(Personal_info c_personal) { personal = c_personal; return; } /* Contestant member function getName(): * Input: * none * Process: * retrieves contestant's Name * Output: * returns a reference to contestant's Name */ Name Contestant::getName() const { return (name); } /* Contestant member function getPersonal_info(): * Input: * none * Process: * retrieves contestant's Personal_info * Output: * returns contestant's Personal_info */ Personal_info Contestant::getPersonal_info() const { return (personal); } /* Contestant member function compareAge(): * Input: * agewanted - age wanted * Process: * compare agewanted to the object’s age * Output: * if ages are the same return true * else return false */ bool Contestant::compareAge(int agewanted) const { if (personal.getAge() == agewanted) return true; else return false; }