高校人事管理系统Word格式文档下载.docx
- 文档编号:812557
- 上传时间:2023-04-29
- 格式:DOCX
- 页数:38
- 大小:274.49KB
高校人事管理系统Word格式文档下载.docx
《高校人事管理系统Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《高校人事管理系统Word格式文档下载.docx(38页珍藏版)》请在冰点文库上搜索。
7—显示所有信息
8—退出
****************************************************
请选择<
1--9>
:
用户通过输入不同的数字进入不同的菜单。
次级菜单主要显示本程序的功能,主要的功能有增加人员资料,删除人员信息,修改人员信息,修改人员信息,查询人员信息,统计人员信息,数据保存,显示所有信息和退出功能。
2.运行时给出明确的提示信息
比如,选择1,系统会提醒用户输入编号,输入完系统会进一步提醒用户输入其他信息和选择,进入相应的选择后会提醒用户选择其他子选择和输入;
比如,输入增加人员,又选择“在职人员(行政人员、教师、一般员工)、退休人员、返聘人员和临时工”再输入信息。
比如在删除人员信息中又显示“所要删除的编号是”和“无此人员”或“已被删除”等
比如在查找人员信息中又显示“所要查找的编号是”或“所要查找的姓名是”和“无此人员”和显示相关信息等。
在统计人员信息中又显示
————————————————————————————
请选择统计对象:
1在职人数
2党员人数
3女工人数
4高学历高职称人数
请选择:
界面来供选择。
比如修改功能则会出现下面的界面
请选择要修改的内容:
1:
姓名2:
性别3:
年龄4:
职工类型5:
职务
6:
职称7:
学历8:
政治面貌9:
来院时间10:
参加工作时间"
选择(1-10):
在实现完菜单中的子程序功能,系统会提醒用户按任意键继续(就是重新返回到主菜单进行其他操作),最后根据提示信息输入8退出系统,结束本次操作。
4.系统结构设计
本程序的功能结构如图1所示:
图1程序功能结构图
5.源程序代码
/*****************************************************************************/
#include<
iostream.h>
string.h>
fstream.h>
//文件流,数据流输入/输出
#include<
stdlib.h>
//是常用的函数system()、exit()的头文件
iomanip.h>
//参数化输入/输出是setw()函数的头文件
//person类和school类的主体以及主函数由本人和合作者何婷婷共同完成
//文中没有标注由谁完成的,代表由本人和合作者何婷婷共同完成
classperson
{
private:
intno;
//编号
chartype[20];
//职员分类
charname[20];
//姓名
charsex[10];
//性别
intage;
//年龄
chartime1[20];
//任职时间
chartime2[20];
//来院时间
charpos[20];
//职务
chartechpos[20];
//职称
charparty[20];
//政治面貌
charstudy[30];
//最高学历
person*mynext;
//指向下一个指针
public:
person(intnnum,charntype[],charnname[],charnsex[],intnage,charntime1[],charntime2[],char
npos[],charntechpos[],charnparty[],charnstudy[])//构造函数
{
no=nnum;
strcpy(type,ntype);
//字符串的拷贝
strcpy(name,nname);
strcpy(sex,nsex);
strcpy(time1,ntime1);
age=nage;
strcpy(time2,ntime2);
strcpy(pos,npos);
strcpy(techpos,ntechpos);
strcpy(party,nparty);
strcpy(study,nstudy);
mynext=NULL;
//下一个为空
}
person(intnnum,charntype[],charnname[],charnsex[],intnage,charntime1[],charntime2[],
charnpos[],charntechpos[],charnparty[],charnstudy[],person*next)//构造函数2,即重载
mynext=next;
//下一个为有
voidsetnext(person*next)//关于next的函数
person*getnext()//指针函数,把数据从被调函数返回到主调函数
returnmynext;
intgetnum()
returnno;
char*getname()//name是数组用指针
returnname;
char*getsex()//sex是数组用指针
returnsex;
char*getpos()//pos是数组用指针
returnpos;
char*gettechpos()//techpos是数组用指针
returntechpos;
char*gettime1()//time1是数组用指针
returntime1;
char*gettime2()//time2是数组用指针
returntime2;
char*getparty()//party是数组用指针
returnparty;
char*getstudy()//study是数组用指针
returnstudy;
intgetage()
returnage;
voidgetag(intas)
age=as;
char*gettype()//type是数组用指针
returntype;
};
//链表类
classSchool
person*myfirst;
intfirstnum;
School()
myfirst=NULL;
School(intnnu,charntyp[],charnnam[],charnse[],intnag,charntim1[],charntim2[],charnpo[],charntechpo[],charnpart[],charnstud[])
myfirst=newperson(nnu,ntyp,nnam,nse,nag,ntim1,ntim2,npo,ntechpo,npart,nstud);
//动态分配内存创立节点
}//初始化
voidinsertatlast(intnnum,charntype[],charnname[],charnsex[],intnage,charntime1[],charntime2[],charnpos[],charntechpos[],charnparty[],charnstudy[])//成员函数
person*next=myfirst;
if(next==NULL)
myfirst=newperson(nnum,ntype,nname,nsex,nage,ntime1,ntime2,npos,ntechpos,nparty,nstudy);
else
{
while(next->
getnext()!
=NULL)//已经有至少一个编号内容
next=next->
getnext();
next->
setnext(newperson(nnum,ntype,nname,nsex,nage,ntime1,ntime2,npos,ntechpos,nparty,nstudy,next->
getnext()));
//调用构造函数2
}
voidprintf(intr)//输入函数*由合作者何婷婷完成
intnage;
charntype[20],nname[20],nsex[20],ntime1[20],ntime2[20],npos[20],ntechpos[20],nparty[20],nstudy[20];
cout<
<
"
请输入编号为"
r<
的成员的信息"
endl;
输入职工分类码[poli(行政人员),teac(老师),work(一般人员),outwork(退休人员),rework(返聘人员),timework(临时工)]:
cin>
>
ntype;
输入姓名:
nname;
输入性别:
(女性—f,男性—m)"
nsex;
输入年龄:
nage;
参加工作时间:
ntime1;
输入来院时间:
ntime2;
输入职务[no(无),ke(科级),chu(处级),di(地级)]:
npos;
输入职称[no(无),chu(初级),zhong(中级),gao(高级)]:
ntechpos;
输入加入党派[qz(群众),gd(中共党员),mzd(民主党派)]:
nparty;
输入学历[xiao(小学),chu(初中),gao(高中),zhuan(大专),da(大学),suo(硕士),bo(博士)]:
nstudy;
insertatlast(r,ntype,nname,nsex,nage,ntime1,ntime2,npos,ntechpos,nparty,nstudy);
//调用函数
voidprintf1(person*ahead)//定义一个指针对象*由本人完成
{//setiosflags(ios:
left)左对齐,setw是操作子,设定下一次输出输入宽度
编号:
setiosflags(ios:
left)<
setw(26)<
ahead->
getnum()<
姓名:
getname()<
性别:
getsex()<
年龄:
getage()<
职工类型:
setw(22)<
gettype()<
职务:
getpos()<
职称:
gettechpos()<
学历:
getstudy()<
政治面貌:
getparty()<
来院时间:
gettime1()<
gettime2()<
voidpri()//显示所有信息*由本人完成
person*ahead=myfirst;
编号姓名性别年龄职工类型职务职称学历政治面貌来院时间参加工作时间\n"
;
while(ahead!
=NULL)
cout<
setw(4)<
setw(6)<
getname()
<
setw(5)<
getage()
setw(10)<
getpos()
getstudy()
setw(9)<
setw(12)<
gettime1()
ahead=ahead->
//一个一个输出
voidadd()//增加函数*由合作者何婷婷完成
inti,a,b;
person*p1=myfirst;
//初始化对象指针
if(p1==NULL)
请输入编号:
cin>
i;
printf(i);
//调用前面的printf函数
if(p1->
getnext()==NULL)//获得节点
{
a=p1->
getnum()+1;
//
printf(a);
}
else
while(p1->
{
p1=p1->
//在原由的基础上加内容
}
b=p1->
//数字加1>
=2
printf(b);
boolremovedatnum()//删除函数*由合作者何婷婷完成
intbh;
person*follow=ahead;
cout<
请输入要删除人员的编号:
bh;
if(ahead==NULL)//判断链表是否为空。
若为空,返回false,否则返回true。
returnfalse;
if(ahead->
getnum()==bh)
myfirst=myfirst->
cout<
编号为"
bh<
的成员以被删除"
deleteahead;
//销毁链表
returntrue;
ahead=ahead->
while(ahead!
if(ahead->
{
follow->
setnext(ahead->
getnext());
cout<
的成员以被删除\n"
deleteahead;
returntrue;
}
follow=ahead;
ahead=ahead->
要删除的成员不存在!
returnfalse;
boolfind1()//根据编号查找,返回是真OR假*由合作者何婷婷完成
intid;
id;
**********************************"
if(ahead==NULL)
无人员信息!
while(ahead!
if(ahead->
getnum()==id)
printf1(ahead);
returntrue;
else
//继续查找,比如输入了一个没有的id,就用到这里
无此人信息:
boolfind2()//根据姓名查找*由合作者何婷婷完成
charnm[20];
输入姓名"
nm;
无人员信息"
if(strcmp(ahead->
getname(),nm)==0)
查无此人:
voidstat()//统计函数*由本人完成
intxx,sz=0;
请选择统计对象:
"
1在职人数"
2党员人数"
3女工人数"
4高学历高职称人数"
请选择:
xx;
switch(xx)
case1:
person*ahead=myfirst;
if(ahead==NULL)
{//strcmp是字符串函数,比较大小
if(strcmp(ahead->
gettype(),"
poli"
)==0||strcmp(ahead->
teac"
work"
)==0)
ahead=ahead->
sz++;
else
在职人数:
sz<
};
break;
case2:
无人员信息\n"
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 高校 人事管理系统