baseclass.cpp

来自「校园刷卡系统」· C++ 代码 · 共 45 行

CPP
45
字号
#ifndef HIS
#include"../ClassHead/BaseClass.hpp"
#endif

Person::Person()
{name="";sex="";ID="";phone="";}

Person::Person(String n,String s,String id,String p)
{name=n;sex=s;ID=id;phone=p;}

void Person::setData(String n,String s,String id,String p)
{name=n;sex=s;ID=id;phone=p;}

String Person::getID()
{return ID;}
String& Person::getName()
{return name;}
String Person::getSex()
{return sex;}

Employee::Employee()
{empID=0;empType='0';date=Now().CurrentDate();}

Employee::Employee(unsigned eID,String n,String s,char type,String id,String p):Person(n,s,id,p)
{
empID=eID;
empType=type;
date=Now().CurrentDate();
}

void Employee::setData(unsigned eID,String n,String s,char type,String id,String p)
{
empID=eID;
empType=type;
date=Now().CurrentDate();
Person::setData(n,s,id,p);
}

void Employee::setPhone(String s)
{phone=s;}

unsigned Employee::getEmpID()
{return empID;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?