2个回答
展开全部
class Guyuan
{
Private:
int nNianlin;
int nGonglin;
int nXinshui;
public:
void SetInfo(int nNian_Lin,int nGong_lin,int nXin_shui)
{ nNianlin = nNian_Lin;
nGonglin = nGong_lin;
nXinshui =nXin_shui};
int GetNianlin(){return nNianlin;};
int GetXinshui(){return nGonglin;};
int GetGonglin(){return nXinshui;};
};
{
Private:
int nNianlin;
int nGonglin;
int nXinshui;
public:
void SetInfo(int nNian_Lin,int nGong_lin,int nXin_shui)
{ nNianlin = nNian_Lin;
nGonglin = nGong_lin;
nXinshui =nXin_shui};
int GetNianlin(){return nNianlin;};
int GetXinshui(){return nGonglin;};
int GetGonglin(){return nXinshui;};
};
展开全部
class employee
{
private:
int age;
int workyear;
float salary;
public:
employee(int a=0;int w=0;float s=0.0){age=a;workyear=w;salary=s;}
void setage(int a){age=a;}
int getage(){return age;}
void setworkyear(int w){workyear=w;}
int getworkyear(){return workyear;}
void setsalary(float s){salary=s;}
float getsalary(){return salary;}
};
{
private:
int age;
int workyear;
float salary;
public:
employee(int a=0;int w=0;float s=0.0){age=a;workyear=w;salary=s;}
void setage(int a){age=a;}
int getage(){return age;}
void setworkyear(int w){workyear=w;}
int getworkyear(){return workyear;}
void setsalary(float s){salary=s;}
float getsalary(){return salary;}
};
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询