职工工资信息管理系统怎么弄(至少包括:姓名,职务,职称,工资)

我做的是第四个课题 下面是题目 求高手解答
《程序设计及C语言》课程设计指导
一、课程设计目的
1、通过课程设计,熟练掌握Visual C++ 6.0 开发环境的使用,提高程序调试能力;
2、通过课程设计,提高学生分析问题、解决问题的能力;
3、通过课程设计,复习巩固C语言的循环结构、指针、数组、结构体、文件等方面的知识,并在实践中加以运用。
4、通过课程设计,提高学生查阅资料、吸收和运用新知识的能力。
二、课程设计要求
每个学生在下列课题中做一题(按学号最后一位+1),并独立完成(可参考前面完成的作业)。
1、学生成绩管理系统(至少包括: 学号、姓名、3门成绩、平均成绩)
2、学生档案管理系统(至少包括:学号,姓名,身份证号码,家庭地址)
3、同学通信录管理系统(至少包括:姓名,手机号码,电子邮件地址)
4、职工档案管理系统(至少包括:姓名,年龄,部门,职务)
5、职工工资信息管理系统(至少包括:姓名,职务,职称,工资)
6、小型图书信息管理系统(至少包括:书名,出版社,单价,库存数量)
7、超市商品信息管理系统(至少包括:商品名称,商品编号,单价,库存数量)
8、实验室设备信息管理系统(至少包括:设备名称,设备类型,管理人,设备数量)
9、试卷信息管理系统(至少包括:课程名,班级,题目数量,考试时间)
10、列车时刻表信息管理系统(至少包括:车次,目的地,到站时间,发车时间)
每课题均须具有以下功能(但不限于):
1、信息录入,包括记录的追加和插入;
2、信息删除;
3、信息修改;
4、信息排序和查询;
5、信息的保存和装入;
6、简单的帮助。
三、设计方法及过程
1、问题分析
包括系统所要完成的功能、数据结构分析,如问题处理过程中使用的结构体及包含的成员等,文件的类型、存储的内容等,输入/输出的格式等。
2、系统功能设计及模块(函数)划分
根据分析结果,画出系统结构图,确定系统的功能模块,包括模块的名字、接口(即函数的参数、返回值)及功能,模块间的调用关系。
3、模块的算法设计
设计每个功能模块的算法,可以用伪代码或流程图表示。
4、编码
代码的编写要符合规范,程序中对各个模块的功能、模块主要实现部分都需要加上注释,以增加程序的可读性,便于软件维护。
5、调试
四、设计报告
课程设计完成后,每位同学要写出《程序设计及C语言》课程设计报告,打印并上交(同时上交源代码),作为平时成绩的评定依据之一。报告的内容包括:问题分析、系统功能设计及模块(函数)划分、模块的算法设计、源代码及设计总结五个部分。
是要程序 有没有高手刚好也做了这东西
[email protected]

c语言编的学生信息管理系统小程序 参考吧
<stdio.h>
#include <stdlib.h>
#include <string.h>
struct st
{
char name[20];
int english;
int math;
int chinese;
int average;
st *next;

};
struct st *pend=NULL;//初始链表的尾指针
struct st *pendorder=NULL;//顺序链表的尾指针
struct st *pheadorder=NULL;//顺序链表的头指针
struct st *makeorder(struct st *phead);//按分数从大到小排序 生产链表
struct st *addtolist(struct st *add);// 将平均分最大的添到另一个链表
struct st *createlist();//输入学生信息时生成的初始链表
struct st * deletestu(char *name,st *phead);//删除一个学员的信息
struct st *addstu(st *name,st *phead);//向顺序链表添加一个元素,插入的地方按平均成绩
void printinfo(st *phead);//按平均成绩打印出每个学员的名字

int main()
{
int select;
char deletename[20];
struct st *addstud=NULL;
struct st *phead=NULL;
phead=createlist();//输入时创建链表
pheadorder=makeorder(phead);//将链表排序
printf("input operation:1----deletestudent,2-----addstudent,3----output all student\n");
scanf("%d",&select);
while(select>0)//选择操作1为删除2为添加3为打印,其他的输入会跳出循环
{
switch(select)
{

case 1:
printf("please input the of the student to be deleted:\n");
scanf("%s",deletename);
pheadorder=deletestu(deletename,pheadorder);
printf("input operation:1----deletestudent,2-----addstudent,3----output all student\n");
scanf("%d",&select);
break;
case 2:
printf("please input the information of the student to be added:\n");
addstud=new st;
scanf("%s%d%d%d",addstud->name,&(addstud->english),&(addstud->math),&(addstud->chinese));
addstud->average=((addstud->english)+(addstud->math)+(addstud->chinese))/3;
while((addstud->english)<=0)
{
delete addstud;
printf("please input the information of the student to be added:\n");
addstud=new st;
scanf("%s%d%d%d",addstud->name,&(addstud->english),&(addstud->math),&(addstud->chinese));
addstud->average=((addstud->english)+(addstud->math)+(addstud->chinese))/3;
}
pheadorder=addstu(addstud,pheadorder);
printf("input operation:1----deletestudent,2-----addstudent,3----output all student\n");
scanf("%d",&select);
break;
case 3:
printinfo(pheadorder);
printf("input operation:1----deletestudent,2-----addstudent,3----output all student\n");
scanf("%d",&select);
break;
default:
goto laber;

}
}
laber:system("pause");
return 1;

}
struct st *createlist()//输入时创建初始链表
{
struct st *pfirst=NULL;
struct st *plast=NULL;
struct st *p=new st;
printf("please input the information of the students:\n");
scanf("%s%d%d%d",p->name,&(p->english),&(p->math),&(p->chinese));
p->average=((p->english)+(p->math)+(p->chinese))/3;
while((p->english)>0)
{
if(pfirst==NULL)
pfirst=plast=p;
else
plast->next=p;
plast=p;
printf("please input again:\n");
p=new st;
scanf("%s%d%d%d",p->name,&(p->english),&(p->math),&(p->chinese));
p->average=((p->english)+(p->math)+(p->chinese))/3;

}
plast->next=NULL;
printf("list create successful\n");
delete p;
return pfirst;
}
struct st *deletestu(char *name,st *phead)//删除一个学员
{
int flag=0;
st *p=NULL;
if(strcmp(phead->name,name)==0)
{
phead=phead->next;
flag=1;
}
else
for(p=phead;p;p=p->next)
{
if(strcmp(p->next->name,name)==0)
{
p->next=p->next->next;
flag=1;
break;
}
}
if(!flag)
printf("the student you delete is not in the list\n");
else printf("delete successful\n");
return phead;
}
struct st *addstu(st *name,st *phead)//按平均分增加一个学员
{
name->next=NULL;
struct st *p=NULL;
if((name->average)>(phead->average))
{
name->next=phead;
phead=name;
return phead;
}
else
{
for(p=phead;p->next;p=p->next)
{
if((name->average)>(p->next->average))
{
name->next=p->next;
p->next=name;
return phead;
}

}
}
p=p->next;
p->next=name;
return phead;

}
void printinfo(st *phead)//打印信息
{
st *p;
for(p=phead;p;p=p->next)
printf("%s\n",p->name);
}

struct st *addtolist(struct st *phead,struct st *add)//生成顺序链表时每回都添加一个平均成绩最高的学员信息
{
add->next=NULL;
if(phead==NULL)
pendorder=phead=add;
else
pendorder->next=add;
pendorder=add;
return phead;

}

struct st *makeorder(struct st *phead)//将初始链表变成顺序链表
{
if(phead!=NULL)
{
int max;
struct st *p=NULL;
struct st *index=NULL;
while(phead)
{
max=0;
for(p=phead;p;p=p->next)
{
if(p->average>max)
{
max=p->average;
index=p;
}
}
phead=deletestu(index->name,phead);
pheadorder=addtolist(pheadorder,index);
}
return pheadorder;
}
else printf("there is no list members to be ordered\n");
return pheadorder;
}

————小型公司工资管理系统
一〉题目要求
(1)公司主要有4类人员:经理、技术员、销售员、销售经理。要求存储这些人的职工号、姓名、月工资、岗位、年龄、性别等信息。
(2)工资的计算方法:
A.经理:固定月薪为8000;
B.技术员:工作时间*小时工资(100元每小时);
C.销售员:销售额*4%提成;
D.销售经理:底薪(5000)+所辖部门销售额总额*0.5%;
(3)输入数据要求每类人员不能少于4人,并按以下格式输出:
职工号 姓名 性别 年龄 岗位 工资 排名

及某部门经理所辖部门各售货员的业绩及自己的工资表:

(4)菜单要求:要有一个菜单,用于选择各项功能,其中
1) 数据录入:输入各种数据;
2) 数据统计:各销售经理的工资计算及最终按工资进行的冒泡排序;
3) 数据打印:打印上述表格;
4)数据备份:把相关数据写入文件;
5)退出:推出本系统;

二〉程序最终版:
1,程序员代码
#include<iostream.h>
#include<stdlib.h>
#include<fstream.h>
#include<iomanip.h>
#include<string.h>
class employee
{
public:
float salary;
employee()
{
salary=0;
}
void pay(){}
void print(){}
void input()
{
cout<<"的编号:";
cin>>no;
cout<<" 其姓名:";
cin>>name;
cout<<" 性别(m/w):";
cin>>sex;
cout<<" 年龄:";
cin>>age;
}
protected:
int no;
char name[8];

char sex;
int age;

};
class manager:virtual public employee
{
protected:
float monthlypay,sale;
public:

manager(){monthlypay=8000;}
void input(){cout<<"经理";employee::input();}
void save()
{
fstream outfile;
outfile.open("F:shuju.txt",ios::app);
if(!outfile)
{
cout<<"F can't open.\n";
abort();
}
outfile<<"经理"<<endl;
outfile<<"号码"<<no<<"名字"<<name<<"性别"<<sex<<"年龄"<<age<<"工资"<<salary<<endl;
}
void pay(){salary=monthlypay;}
void print()
{
cout<<"├—————┼—————┼—————┼—————┼—————┤"<<endl;
cout<<"│"<<setw(10)<<no<<"│"<<setw(10)<<name<<"│"<<setw(10)<<sex\
<<"│"<<setw(10)<<age<<"│"<<setw(10)<<salary<<"│"<<endl;
}
};

class technician:virtual public employee
{
private:
float hourlyrate;
int workhours;
public:
technician(){hourlyrate=100;}
void pay()
{
cout<<name<<"本月工作时数:";
cin>>workhours;
salary=hourlyrate*workhours;
}
void input(){cout<<"技术工"<<endl;employee::input();}
void save()
{
fstream outfile;
outfile.open("F:shuju.txt",ios::app);
if(!outfile)
{
cout<<"F can't open.\n";
abort();
}
outfile<<"技术工"<<endl;
outfile<<"号码"<<no<<"名字"<<name<<"性别"<<sex<<"年龄"<<age<<"工资"<<salary<<endl;
}
void print()
{
cout<<"├—————┼—————┼—————┼—————┼—————┤"<<endl;
cout<<"│"<<setw(10)<<no<<"│"<<setw(10)<<name<< "│"<<setw(10)<<sex\
<<"│"<<setw(10)<<age<<"│"<<setw(10)<<salary<<"│"<<endl;
}
};
class salesman:virtual public employee
{
protected:
float commrate;
float sales;
public:
salesman(){commrate=0.04;}
void input(){cout<<"销售员";employee::input();}
void save()
{
fstream outfile;
outfile.open("F:shuju.txt",ios::app);
if(!outfile)
{
cout<<"f can't open.\n";
abort();
}
outfile<<"技术工"<<endl;
outfile<<"号码"<<no<<"名字"<<name<<"性别"<<sex<<"年龄"<<age<<"工资"<<salary<<endl;
}
void pay()
{
cout<<name<<"本月销售额:";
cin>>sales;
salary=sales*commrate;
}
void print()
{
cout<<"├—————┼—————┼—————┼—————┼—————┤"<<endl;
cout<<"│"<<setw(10)<<no<<"│"<<setw(10)<<name<<"│"<<setw(10)\
<<sex<<"│"<<setw(10)<<age<<"│"<<setw(10)<<salary<<"│"<<endl;
}
};

class salesmanager:virtual public manager,virtual public salesman
{
private:
float total;int no1,no2,no3,no4;char name1[8],name2[8],name3[8],name4[8];
float sale1,sale2,sale3,sale4;
public:
int flag;
void salemanager()
{
monthlypay=5000;
commrate=0.005;
}
void input(){cout<<"销售经理";employee::input();}
void save()
{
fstream outfile;
outfile.open("F:shuju.txt",ios::app);
if(!outfile)
{
cout<<"f can't open.\n";
abort();
}
outfile<<"销售经理"<<endl;
outfile<<"号码"<<no<<"名字"<<name<<"性别"<<sex<<"年龄"<<age<<"工资"<<salary<<endl;
}
void savesale()
{
fstream outfile;
outfile.open("F:shuju.txt",ios::app);
if(!outfile)
{
cout<<"F can't open.\n";
abort();
}
outfile<<"销售经理所辖售员业绩及自己的工资"<<endl;
outfile<<"编号"<<no1<<"名字"<<name1<<"工资"<<sale1<<endl;
outfile<<"编号"<<no2<<"名字"<<name2<<"工资"<<sale2<<endl;
outfile<<"编号"<<no3<<"名字"<<name3<<"工资"<<sale3<<endl;
outfile<<"编号"<<no4<<"名字"<<name4<<"工资"<<sale4<<endl;
}
int min(float salary1,float salary2)
{
if(salary1<salary2)
return 1;
else return 2;
}
void pay()
{

salemanager();
salary=monthlypay+commrate*totalsale();
}
float totalsale()
{total=sale1+sale2+sale3+sale4;return total;}
void printtotal()
{
cout<<"├—————┴——┬——┴—————┤"<<endl;
cout<<"│销售额合计 │ "<<setw(10)<<total<<" │"<<endl;
cout<<"└————————┴————————┘"<<endl;
}
void sort(salesmanager &p)
{
int tmp,i,j;
for(j=0;j<2;j++)
for(i=0;i<2;i++)
if(total<p.salary)
{
tmp=salary;
total=p.salary;
p.salary=tmp;
tmp=no;
no=p.no;
p.no=tmp;
}
}
void saler()
{
cout<<name<<"所管部门月销售量:";
cout<<"职工编号:";
cin>>no1;
cout<<" 职工姓名:";
cin>>name1;
cout<<" 销售额:";
cin>>sale1;
cout<<"职工编号:";
cin>>no2;
cout<<" 职工姓名:";
cin>>name2;
cout<<" 销售额:";
cin>>sale2;
cout<<"职工编号:";
cin>>no3;
cout<<" 职工姓名:";
cin>>name3;
cout<<" 销售额:";
cin>>sale3;
cout<<"职工编号:";
cin>>no4;
cout<<" 职工姓名:";
cin>>name4;
cout<<" 销售额:";
cin>>sale4;

}
void saleprint()
{
cout<<"│"<<setw(10)<<no1<<"│"<<setw(10)<<name1<<"│"<<setw(10)<<sale1<<"│"<<endl;
cout<<"├—————┼—————┼—————┤"<<endl;
cout<<"│"<<setw(10)<<no2<<"│"<<setw(10)<<name2<<"│"<<setw(10)<<sale2<<"│"<<endl;
cout<<"├—————┼—————┼—————┤"<<endl;
cout<<"│"<<setw(10)<<no3<<"│"<<setw(10)<<name3<<"│"<<setw(10)<<sale3<<"│"<<endl;
cout<<"├—————┼—————┼—————┤"<<endl;
cout<<"│"<<setw(10)<<no4<<"│"<<setw(10)<<name4<<"│"<<setw(10)<<sale4<<"│"<<endl;
}
void print()
{
cout<<"├—————┼—————┼—————┼—————┼—————┤"<<endl;
cout<<"│"<<setw(10)<<no<<"│"<<setw(10)<<name<<"│"<<setw(10)<<sex<<"│"
<<setw(10)<<age<<"│"<<setw(10)<<salary<<"│"<<endl;
}
};
void main()
{
manager m[4];
technician t[4];
salesman s[4];
salesmanager sm[4];
t[1].save();
int flag=1,operate,minnum=0;
do{
cout<<" ★★小型公司工资管理系统★★\n";
cout<<" ┌—————————————┐\n";
cout<<" │ 请选择您所需的操作 │\n";
cout<<" │ 数据输入:1,并按回车键 │\n";
cout<<" │ 数据统计:2,并按回车键 │\n";
cout<<" │ 数据打印:3,并按回车键 │\n";
cout<<" │ 数据备份:4,并按回车键 │\n";
cout<<" │ 退出系统:5,并按回车键 │\n";
cout<<" └—————————————┘\n";
cout<<" 请选择一个操作: ";
cin>>operate;
switch(operate)
{
case 1:
cout<<"please waiting........"<<endl;
{
for(int i=0;i<4;i++)
{m[i].input();}
for(int j=0;j<4;j++)
{t[j].input();}
for(int k=0;k<4;k++)
{s[k].input();}
for(int l=0;l<4;l++)
{sm[l].input();}
}
{
for(int i=0;i<4;i++)
{m[i].pay();}
for(int j=0;j<4;j++)
{t[j].pay();}
for(int k=0;k<4;k++)
{s[k].pay();}
for(int l=0;l<4;l++)
{sm[l].saler();sm[l].pay();}
};break;
case 2:
cout<<"please waiting......."<<endl;
{
{
for(int l=0;l<4;l++)
sm[l].totalsale();

};

cout<<" 第一位经理的销售员"<<endl;
cout<<"┌—————┬—————┬——————┐"<<endl;
cout<<"│ 职工号 │ 姓名 │ 销售额 │"<<endl;
sm[0].saleprint();
sm[0].printtotal();
cout<<" 排序已经完成"<<endl;
cout<<"各销售经理的排名"<<endl;
cout<<"┌—————┬—————┬—————┬—————┬———————┐"<<endl;
cout<<"│ 职工号 │ 姓名 │ 性别 │ 年龄 │ 工资 │"<<endl;
for(int i=0;i<4;i++)
{
minnum=0;
for(int ddd=0;ddd<4;ddd++)
{
if(sm[minnum].salary>sm[ddd].salary&&sm[ddd].flag!=1)
{
minnum=ddd;
}
}
sm[minnum].flag=1;
sm[minnum].print();
}
cout<<"└—————┴—————┴—————┴—————┴———————┘"<<endl;
};break;

case 3:
cout<<"please waiting........"<<endl;
{
cout<<"*********************************************************************"<<endl;
cout<<" 经理工资一览表如下:"<<endl;
cout<<"┌—————┬—————┬—————┬—————┬——————┐"<<endl;
cout<<"│ 职工号 │ 姓名 │ 性别 │ 年龄 │ 工资 │"<<endl;
for(int i=0;i<4;i++)
{m[i].print();}
cout<<"└—————┴—————┴—————┴—————┴——————┘"<<endl;

cout<<"*********************************************************************"<<endl;
cout<<" 技术员的月工资一览表:"<<endl;
cout<<"┌—————┬—————┬—————┬—————┬——————┐"<<endl;
cout<<"│ 职工号 │ 姓名 │ 性别 │ 年龄 │ 工资 │"<<endl;
for(int j=0;j<4;j++)
{t[j].print();}
cout<<"└—————┴—————┴—————┴—————┴——————┘"<<endl;

cout<<"********************************************************************"<<endl;
cout<<" 销售员工资一览表"<<endl;
cout<<"┌—————┬—————┬—————┬—————┬———————┐"<<endl;
cout<<"│ 职工号 │ 姓名 │ 性别 │ 年龄 │ 工资 │"<<endl;
for(int k=0;k<4;k++)
{s[k].print();}
cout<<"└—————┴—————┴—————┴—————┴———————┘"<<endl;

cout<<"********************************************************************"<<endl;
cout<<" 销售经理工资一览表"<<endl;
cout<<"┌—————┬—————┬—————┬—————┬———————┐"<<endl;
cout<<"│ 职工号 │ 姓名 │ 性别 │ 年龄 │ 工资 │"<<endl;
for(int l=0;l<4;l++)
{sm[l].print();}
cout<<"└—————┴—————┴—————┴—————┴———————┘"<<endl;
};break;

case 4:
cout<<"please waiting........"<<endl;
{
for(int i=0;i<4;i++)
{m[i].save();}
for(int j=0;j<4;j++)
{t[j].save();}
for(int k=0;k<4;k++)
{s[k].save();}
for(int l=0;l<4;l++)
{sm[l].save();}
};
cout<<"information have been saved!"<<endl;
break;
case 5:exit(0);break;
default:cout<<"输入错误,请重新1-5间的输入"<<endl;
}
}while(flag=1);
}
备注:1本程序已经修订过,是网络流传的版本的终结版,解决了原始版本不可进行销售经理工资排序的缺点。
2。本程序为本周刚结束的课程设计的自我修正版本。
3 由于图片不可上传,要观看完美界面截图及报告完整内容请登陆我q-zone。。
温馨提示:答案为网友推荐,仅供参考
第1个回答  2010-04-22
我写过一个类似的,使用VC2005写的,你可以参考一下:
http://blog.csdn.net/hanjiangying/archive/2010/03/05/5348863.aspx
第2个回答  2010-04-24
没有邮箱???太大了。。。。。。。。。。。。。。。。
第3个回答  2010-04-23
我QQ1060499732 加 传你本回答被提问者采纳
第4个回答  2010-04-22
自己做吧,帮你做是害你
相似回答