ImageVerifierCode 换一换
格式:DOCX , 页数:32 ,大小:64.37KB ,
资源ID:6328345      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/6328345.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(高校人事管理系统课程设计.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

高校人事管理系统课程设计.docx

1、高校人事管理系统课程设计一 需求分析1. 目的与意义、2. 系统流程图 1 2 3 4 5 6 8 7 二 总体设计1. 系统功能分析 执行程序后,按界面的显示,选择18种操作。选1,增加人员资料,资料包括编号、职工类别、姓名、性别、年龄、来院时间、职务、职称、党派、学历。选2,删除人员信息。选3,修改人员信息,可以选择要修改的内容。选4,查询人员信息,可按编号或姓名查询。选5,数据存盘。选6,数据装入。选7,显示所有信息。选8,退出。2. 系统功能模块划分与设计 三 详细设计1. 源程序代码#include#include#include#includeclass personprivate

2、: int no;/编号 char type20;/职工类型 char name20;/姓名 char sex10;/性别 int age;/年龄 char time20;/来院时间 char pos20;/职务 char techpos20;/职称 char party20;/党派 char study30;/最高学历 person *mynext;/指针语public: person(int nnum,char ntype,char nname,char nsex,int nage,char ntime,char npos,char ntechpos,char nparty,char ns

3、tudy) no=nnum; strcpy(type,ntype);/将ntype的值复制给type strcpy(name,nname); strcpy(sex,nsex); age=nage; strcpy(time,ntime); strcpy(pos,npos); strcpy(techpos,ntechpos); strcpy(party,nparty); strcpy(study,nstudy); mynext=NULL; person(int nnum,char ntype,char nname,char nsex,int nage,char ntime, char npos,c

4、har ntechpos,char nparty,char nstudy,person *next) /某高校,主要人员有:在职人员(行政人员、教师、一般员工)、退休人员、返聘人员和临时工。 /现在,需要存储这些人员的人事档案信息:编号、姓名、性别、年龄、职务、职称、政治面貌、最高学历、来院时间。 no=nnum; strcpy(type,ntype); strcpy(name,nname); strcpy(sex,nsex); age=nage; strcpy(time,ntime); strcpy(pos,npos); strcpy(techpos,ntechpos); strcpy(pa

5、rty,nparty); strcpy(study,nstudy); mynext=next; void setnext(person *next) mynext=next; person *getnext() return mynext; int getnum() return no; char *getname() return name; char *getsex() return sex; char *getpos() return pos; char *gettechpos() return techpos; char *gettime() return time; char *ge

6、tparty() return party; char *getstudy() return study; int getage() return age; void getag(int as) age=as; char *gettype() return type; ;class Schoolprivate: person *myfirst; int firstnum;public: School()/无参构造函数 myfirst=NULL;/将指针置空 School(int nnu,char ntyp,char nnam,char nse,int nag,char ntim,char np

7、o,char ntechpo,char npart,char nstud)/有参构造函数 myfirst=new person(nnu,ntyp,nnam,nse,nag,ntim,npo,ntechpo,npart,nstud); /在信息最后添加新的信息 void insertatlast(int nnum,char ntype,char nname,char nsex,int nage,char ntime,char npos,char ntechpos,char nparty,char nstudy) person *next=myfirst;/定义对象指针并付初值 if(next=N

8、ULL) myfirst=new person(nnum,ntype,nname,nsex,nage,ntime,npos,ntechpos,nparty,nstudy); else while(next-getnext()!=NULL) next=next-getnext(); next-setnext(new person(nnum,ntype,nname,nsex,nage,ntime,npos,ntechpos,nparty,nstudy,next-getnext(); void printf(int r)/获取信息 int nage; char ntype20,nname20,nse

9、x20,ntime20,npos20,ntechpos20,nparty20,nstudy20; cout请输入编号为r的成员的信息endl; cout输入职工分类码行政人员,教师,一般员工,退休人员,返聘人员,临时工:ntype; cout输入姓名:nname; cout输入性别:nsex; cout输入年龄:nage; cout输入来院时间:ntime; cout输入职务无,科级,处级,地级:npos; cout输入职称无,初级,中级,高级:ntechpos; cout输入加入党派群众,中共党员,民主党派:nparty; cout输入学历小学,初中,高中,大专,大学,硕士,博士:nstud

10、y; insertatlast(r,ntype,nname,nsex,nage,ntime,npos,ntechpos,nparty,nstudy); void printf1(person *ahead)/输出信息 cout编号:setiosflags(ios:left)setw(26)getnum()姓名:getname()endl; cout性别:setiosflags(ios:left)setw(26)getsex()年龄:getage()endl; cout职工类型:setiosflags(ios:left)setw(22)gettype()职务:getpos()endl; cout

11、职称:setiosflags(ios:left)setw(26)gettechpos()学历:getstudy()endl; cout政治面貌:setiosflags(ios:left)setw(22)getparty()来院时间:gettime()endl; void printf() person *ahead=myfirst; cout编号-姓名-性别-年龄-职工类型-职务-职称-学历-政治面貌-来院时间nendl; while(ahead!=NULL) coutsetiosflags(ios:left)setw(4)getnum()setiosflags(ios:left)setw(6

12、)getname() ; coutsetiosflags(ios:left)setw(5)getsex()setiosflags(ios:left)setw(4)getage() ;coutsetiosflags(ios:left)setw(10)gettype()setiosflags(ios:left)setw(6)getpos() ; coutsetiosflags(ios:left)setw(6)gettechpos()setiosflags(ios:left)setw(6)getstudy();coutsetiosflags(ios:left)setw(9)getparty()set

13、iosflags(ios:left)setw(12)gettime()getnext(); void add()/添加新信息 int i,a,b; person *p1=myfirst; if(p1=NULL) couti; printf(i); else if(p1-getnext()=NULL)/如果p1的后继指针为空,则执行“printf(a)” a=p1-getnum()+1; printf(a); else while(p1-getnext()!=NULL)/p1的后继指针不为空,则执行“printf(b)” p1=p1-getnext(); b=p1-getnum()+1; pri

14、ntf(b); bool removedatnum( )/删除信息 int bh; person *ahead=myfirst; person *follow=ahead; coutbh; if(ahead=NULL) return false; else if(ahead-getnum()=bh) myfirst=myfirst-getnext(); cout编号为bh的成员以被删除getnext(); while(ahead!=NULL) if(ahead-getnum()=bh) follow-setnext(ahead-getnext(); cout编号为bhgetnext(); co

15、ut要删除的成员不存在!endl; return false; bool find1()/按编号查找 int id; person *ahead=myfirst; person *follow=ahead; cout请输入编号:id; cout*endl; if(ahead=NULL) cout无人员信息!getnum()=id) printf1(ahead); return true; else follow=ahead; ahead=ahead-getnext(); cout无此人信息:endl; return false; bool find2( )/按姓名查找 char nm20; p

16、erson *ahead=myfirst; person *follow=ahead; coutnm; cout*endl; if(ahead=NULL) cout无人员信息getname(),nm)=0) printf1(ahead); return true; else follow=ahead; ahead=ahead-getnext(); cout查无此人:endl; return false; bool upperson()/修改信息 int iid; person *ahead=myfirst; person *follow=ahead; coutiid; if(ahead=NUL

17、L) cout无人员信息getnum()=iid) printf1(ahead); int nu=-1; for(int i=1;nu!=0;i+) int ml; int mll; char ty30; cout请选择要修改的内容:endl; cout 1:姓名2:性别3:年龄4:职工类型 5:职务endl; cout6:职称 7:学历 8:政治面貌 9:来院时间endl; coutml; switch(ml) case 1: coutty; strcpy(follow-getname(),ty); ;break; case 2: coutty; strcpy(ahead-getsex(),

18、ty); ;break; case 3: coutmll; ahead-getag(mll); ;break; case 4: coutty; strcpy(ahead-gettype(),ty); ; break; case 5: coutty; strcpy(ahead-getpos(),ty); ;break; case 6: coutty; strcpy(ahead-gettechpos(),ty); ;break; case 7: coutty; strcpy(ahead-getstudy(),ty); ;break; case 8: coutty; strcpy(ahead-get

19、party(),ty); ;break; case 9: coutty; strcpy(ahead-gettime(),ty); ;break; return true; else ahead=ahead-getnext(); follow=ahead; cout没有此人nnumntypennamensexnagentimenposntechposnpartynstudy; insertatlast(nnum,ntype,nname,nsex,nage,ntime,npos,ntechpos,nparty,nstudy); fperson.close(); coutn人员和相关数据已经装入.n

20、; void save()/保存文件到文件中 ofstream fperson; fperson.open(person.txt,ios:out); person *p=myfirst; while(p) fpersongetnum()tgettype()tgetname()tgetsex()tgetage()tgettime()tgetpos()tgettechpos()tgetparty()tgetstudy(); fpersongetnext(); fperson.close(); cout保存数据已经完成getnext(); delete temp; myfirst=NULL; ;void main() School s;/定义对象 int c; do cout*endl; cout 高校人事管理系统

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1