/********************************************************************* C201 Computer Programming II Fall 2006 Dana Vrajitoru & Implementation of the class Human. **********************************************************************/ #include "human.h" #include using namespace std; // Constructors Human::Human() : Animal(), first_name(""), last_name("") { name = "human"; nr_of_legs = 2; } Human::Human(string s1, string s2) : Animal(), first_name(s1), last_name(s2) { name = "human"; nr_of_legs = 2; } // Destructor Human::~Human() { cout << "Destroying the human." << endl; } // Overloading the function Walk void Human::Walk(int i) { cout << first_name << " walks for " << i << " miles" << endl; } // Redefining the function Walk void Human::Walk() { cout << first_name << " walks on 2 legs." << endl; } // Sets the value of the first name void Human::Set_first_name(string n) { first_name = n; } // Sets the value of the last name void Human::Set_last_name(string n) { last_name = n; } // Redefining the function output name. void Human::Output_name() { cout << first_name; }