#include "iostream"
#include "cstring"
using namespace std;
class Cstudent
{
private:
string name;
int age;
string gender;
public:
void Outputinfo()
{
cout<<"Name: "<<name<<endl;
cout<<"Age: "<<age<<endl;
cout<<"Gender: "<<gender<<endl;
};
void Setinfo (const string & name_, const int& age_, const string& gender_);
string Getname() {return name;}
};
class Cgraduatestudent: public Cstudent{
private:
string leader;
public:
void giveBaoYan()
{
cout<<" was given Baoyan!!"<<endl;
}
void Outputinfo()
{
Cstudent::Outputinfo();
cout<<"leader is: "<<leader<<endl;
}
void Setinfo(const string & name_, const int& age_, const string& gender_, const string& leader_)
{
Cstudent::Setinfo(name_, age_, gender_);
leader = leader_;
}
};
int main ()
{
Cgraduatestudent Derek;
cout<<"please the information: "<<endl;
Derek.Setinfo("Derek",23,"male","Tony");
Derek.Getname();
Derek.giveBaoYan();
cout<<"the information is : "<<endl;
Derek.Outputinfo();
}