Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@OrsoEric
Created January 24, 2019 07:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OrsoEric/4eea645b184fca995586c4b7f5c91a31 to your computer and use it in GitHub Desktop.
Save OrsoEric/4eea645b184fca995586c4b7f5c91a31 to your computer and use it in GitHub Desktop.
Derived Class Header
/****************************************************************************
** Derived Class
** Student
*****************************************************************************
** PARAMETER:
** RETURN:
** DESCRIPTION:
** Class Student inherit from class Human
** A student is a special type of human
****************************************************************************/
class Student: public Human
{
//Visible to all
public:
///--------------------------------------------------------------------------
/// CONSTRUCTORS
///--------------------------------------------------------------------------
//Empty constructor
Student( void );
//Initialized constructor
Student( bool f_male, int age, std::string name, int id );
///--------------------------------------------------------------------------
/// DESTRUCTORS
///--------------------------------------------------------------------------
//Default destructor
~Student( void );
///--------------------------------------------------------------------------
/// SETTERS
///--------------------------------------------------------------------------
//Set student id
bool set_id( int id );
///--------------------------------------------------------------------------
/// GETTERS
///--------------------------------------------------------------------------
//Get student id
int get_id( void );
///--------------------------------------------------------------------------
/// TESTERS
///--------------------------------------------------------------------------
///--------------------------------------------------------------------------
/// PUBLIC METHODS
///--------------------------------------------------------------------------
//Base class has a method show of the same name. This wins out hiding Human::show()
bool show( void );
///--------------------------------------------------------------------------
/// PUBLIC VARS
///--------------------------------------------------------------------------
//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
///--------------------------------------------------------------------------
//student id number
int g_id;
}; //End Class: Student
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment