Created
January 24, 2019 06:52
-
-
Save OrsoEric/78b835802d7fc0f983cd2ebd568e159c to your computer and use it in GitHub Desktop.
Parent Class Header
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**************************************************************************** | |
** Parent Class | |
** Human | |
***************************************************************************** | |
** PARAMETER: | |
** RETURN: | |
** DESCRIPTION: | |
****************************************************************************/ | |
class Human | |
{ | |
//Visible to all | |
public: | |
///-------------------------------------------------------------------------- | |
/// CONSTRUCTORS | |
///-------------------------------------------------------------------------- | |
//Empty constructor | |
Human( void ); | |
//Initialized constructor | |
Human( bool f_male, int age, std::string name ); | |
///-------------------------------------------------------------------------- | |
/// DESTRUCTORS | |
///-------------------------------------------------------------------------- | |
//Default destructor | |
~Human( void ); | |
///-------------------------------------------------------------------------- | |
/// SETTERS | |
///-------------------------------------------------------------------------- | |
//set the age of the human | |
bool set_age( int age ); | |
//set the gender of the human | |
bool set_gender( bool f_male ); | |
//set the name of the human | |
bool set_name( std::string name ); | |
///-------------------------------------------------------------------------- | |
/// GETTERS | |
///-------------------------------------------------------------------------- | |
//Get the age of the human | |
int get_age( void ); | |
//get the gender of the human | |
bool get_gender( void ); | |
//get the name of the human | |
std::string get_name( void ); | |
///-------------------------------------------------------------------------- | |
/// TESTERS | |
///-------------------------------------------------------------------------- | |
///-------------------------------------------------------------------------- | |
/// PUBLIC METHODS | |
///-------------------------------------------------------------------------- | |
//Show Human parameters | |
bool show( void ); | |
///-------------------------------------------------------------------------- | |
/// PUBLIC VARS | |
///-------------------------------------------------------------------------- | |
const int min_age = 0; | |
//Visible to derived classes | |
protected: | |
///-------------------------------------------------------------------------- | |
/// PROTECTED METHODS | |
///-------------------------------------------------------------------------- | |
///-------------------------------------------------------------------------- | |
/// PROTECTED VARS | |
///-------------------------------------------------------------------------- | |
//Visible only inside the class | |
private: | |
///-------------------------------------------------------------------------- | |
/// PRIVATE METHODS | |
///-------------------------------------------------------------------------- | |
//Here so that i can easly copy the code. | |
bool dummy( void ); | |
///-------------------------------------------------------------------------- | |
/// PRIVATE VARS | |
///-------------------------------------------------------------------------- | |
//true = the human is male. | false = the human is female | |
bool g_f_male; | |
//age of the human | |
int g_age; | |
//name of the human | |
std::array<char, MAX_NAME_LENGTH> g_name; | |
}; //End Class: Human |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment