- 1、本文档共23页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
高校职工信息及工资管理系统
#incl?ude ?iostr?eam
?#incl?ude ?strin?g
#i?nclud?e fs?tream?
#in?clude? iom?anip?
usin?g nam?espac?e std?;
cl?ass P?erson? /?/人员信息类 (抽象基类)
{
publ?ic:
?virtu?al vo?id in?put()?=0; ? ? ? ? /?/从键盘输入职工数据
vir?tual ?void ?input?(ifst?ream? infi?le)=0?; ? //从文件读入职工数据
virtu?al vo?id ou?tput(?)=0; ? ? ? ? /?/向屏幕输出职工信息
vir?tual ?void ?outpu?t(ofs?tream? out?file)?=0; ? //向指定文件输出职工信息
vi?rtual? doub?le in?comin?g()=0?; ? ? ? // ?计算职工收入函数
Perso?n() ? ? ? ? //P?erson?基类构造函数
{next=0?; } ? ? //?指针赋值为空 ? ?
vir?tual ?~Pers?on(){?}
pro?tecte?d:
c?har n?ame[1?5]; ? ? ?//职工姓名
string ?ID; ? ? ? //职工编号
in?t dut?y; ? ? ? /*岗位类别 :1:教师 2:实验员 3:行政人员 4:教师兼实验员 5:行政人员兼教师*/
char ?addre?ss[15?0] ;
? stri?ng ph?one;
? char? educ?ation?[50];? /?/a;学士 b;硕士 c;博士
char ?sex[1?0];
?int a?ge;
?doubl?e sal?ary; ? ? /?/职工薪水
Per?son *?next;? ? ? //指针成员
fri?end b?ool i?sexis?t(str?ing i?d);
? fr?iend ?class? Sala?ry_Ma?nagem?ent; ? //?将Salary_Ma?nagem?ent类声明为友员类
};
c?lass ?Teach?er :v?irtua?l pub?lic P?erson?
{
pr?otect?ed:
? int? hour?s; ? ? //?上学期工作量
public:?
Tea?cher(?)
{
? sal?ary=1?000; ? /?/教师基本工资1000元
duty=?1; ? ? //岗位类别为1
}
v?oid i?nput(?);
v?oid i?nput(?ifstr?eam ?infil?e);
?void ?outpu?t();
? void? outp?ut(of?strea?m ou?tfile?);
d?ouble? inco?ming(?);
};?
clas?s Ass?itant? :vir?tual ?publi?c Per?son
{?
publ?ic:
?Assit?ant()?
{
? sala?ry=80?0; ? //?实验员基本工资800元
duty=2?; ? ? //岗位类别为2
all?owanc?e=150?; /?/实验室补助为150元
};
voi?d inp?ut();?
voi?d inp?ut(if?strea?m in?file)?;
vo?id ou?tput(?);
v?oid o?utput?(ofst?ream? outf?ile);?
dou?ble i?ncomi?ng();?
prot?ected?:
? int ?hours?;
do?uble ?allow?ance;?
};
?class? Mana?ger :?virtu?al pu?blic ?Perso?n
{
p?ublic?:
Ma?nager?()
{?
? sal?ary=9?00; ? ? //行政人员基本工资为900元
duty=?3; ? ? /?/岗位类别为3
allo?wance?=250;? ?//行政补
您可能关注的文档
- 高中化学 阶段质量检测(三) 苏教版必修2.doc
- 高中化学 阶段质量检测(四) 苏教版必修2.doc
- 高中英语《Unit 3 Celebration》Section Ⅳ& SectionⅤ课下作业 必修1.doc
- 高中英语《Unit 3 Celebration》Section Ⅱ 课时跟踪检测课下作业 必修1.doc
- 高中英语《Unit19 Communication-Language》学案 选修7.doc
- 高中英语《Unit19 Communication-Lesson 3 Language》练习题 选修7.doc
- 高中英语《Unit23 conflict lesson3 War Memories》学案 选修8.doc
- 高二数学上学期期初试题 文新人教A版.doc
- 高二物理上学期期中试题 理新人教版.doc
- 高价公路桥直线连续梁计算书.doc
文档评论(0)