当前位置:首页 » 课程大全 » 工资管理系统课程设计

工资管理系统课程设计

发布时间: 2020-11-28 11:06:29

⑴ 谁有工资管理系统C语言课程设计

/*
Microsoft Visual C++ .NET编译通过
by 做他@07.12.29
*/

#include "stdafx.h"
#include "iostream"
#include "string"
#include "list"
#include "cassert"
using namespace std;

/*
编号、姓名、部门、应付工资、保险、税金、实付工资。
其中实付工资由公式计算得到:实付工资=应付工资 - 保险- 税金
*/
struct employee{
string m_num;//编号
string m_name;//姓名
string m_dep;//部门
double m_salary;//应付工资
double m_insurance;//保险
double m_tax;//税金
};

/*
(1)录入:输入职工数据,其中“实付工资”通过计算得到;
(2)删除:删除指定的职工信息(输入姓名,若找到则删除该信息)
(3) 修改:允许对已经录入的数据重新进行编辑、修改;
(4) 显示:显示全体职工数据;
(5)查询:
a. 输入职工姓名,显示该职工的全部数据;
b. 输入某部门值,显示该部门职工的数据、工资总额、平均工资。
(6) 退出程序。
*/

list<employee> emps;

int _tmain(int argc, _TCHAR* argv[])
{
void print(const employee &e);
void input();
void del();
void mod();
void show_all();
void show_name();
void show_dep();

cout<<"简易职工薪水管理程序 by 做他\n";// delete this line
cout<<"版权没有 请随意复制或修改任何代码\n";//delete this line

cout<<"请选择操作:1.录入 2.删除 3.修改 4.查询 5.显示所有员工 6.退出 :";
int choose=0;
cin>>choose;
assert(!cin.fail());
while (choose!=6)
{
if (choose==1) input();
if (choose==2) del();
if (choose==3) mod();
if (choose==4)
{
int choice=0;
cout<<"请选择操作 1.按姓名查询 2.按部门查询 3.退出:";
cin>>choice;
if (choice==1) show_name();
if (choice==2) show_dep();
if (choice==3)
{
cout<<"请选择操作:1.录入 2.删除 3.修改 4.查询 5.显示所有员工 6.退出 :";
cin>>choose;
assert(!cin.fail());
continue;
}
}
if (choose==5) show_all();
cout<<"请选择操作:1.录入 2.删除 3.修改 4.查询 5.显示所有员工 6.退出 :";
cin>>choose;
assert(!cin.fail());
}
return 0;
}

void print(const employee &e)
{
cout<<"编号:"<<e.m_num<<endl;
cout<<"姓名:"<<e.m_name<<endl;
cout<<"部门:"<<e.m_dep<<endl;
cout<<"保险:"<<e.m_insurance<<endl;
cout<<"税金:"<<e.m_tax<<endl;
cout<<"应付工资:"<<e.m_salary<<endl;
cout<<"实付工资:"<<e.m_salary-e.m_insurance-e.m_tax<<endl;
}

void input()
{
string num,name,dep;
double salary,ins,tax;
cout<<"请输入员工编号:";
cin>>num;
cout<<"请输入员工姓名:";
cin>>name;
cout<<"请输入员工部门:";
cin>>dep;
cout<<"请输入员工保险:";
cin>>ins;
assert(!cin.fail());
cout<<"请输入员工税金:";
cin>>tax;
assert(!cin.fail());
cout<<"请输入员工应付工资:";
cin>>salary;
assert(!cin.fail());
employee temp;
temp.m_dep=dep;
temp.m_insurance=ins;
temp.m_name=name;
temp.m_num=num;
temp.m_salary=salary;
temp.m_tax=tax;
emps.push_back(temp);
cout<<"员工录入操作完毕.\n";
}

void del()
{
if (emps.size()==0)
{
cout<<"没有员工记录.\n";
return;
}
string name;
bool isfind=false;
cout<<"请输入要删除的员工姓名:";
cin>>name;
list<employee>::iterator iter;
for (iter=emps.begin();iter!=emps.end();iter++)
{
if (iter->m_name==name)
{
isfind=true;
emps.erase(iter);
cout<<"姓名为\""<<name<<"\"的员工记录已删除.\n";
return;
}
}
if (!isfind)
{
cout<<"没有找到姓名为\""<<name<<"\"的员工.\n";
return;
}
}

void mod()
{
if (emps.size()==0)
{
cout<<"员工记录为空.\n";
return;
}
bool isfind=false;
string name;
cout<<"请输入要修改的员工姓名:";
cin>>name;
list<employee>::iterator iter;
for (iter=emps.begin();iter!=emps.end();iter++)
{
if (iter->m_name==name)
{
isfind=true;
cout<<"姓名为\""<<name<<"\"的员工记录已找到.\n";
break;
}
}
if (isfind)
{
string num,name,dep;
double tax,ins,salary;
print(*iter);
cout<<endl;
cout<<"请输入新的员工编号:";
cin>>num;
cout<<"请输入新的员工姓名:";
cin>>name;
cout<<"请输入新的员工部门:";
cin>>dep;
cout<<"请输入新的员工保险:";
cin>>ins;
assert(!cin.fail());
cout<<"请输入新的员工税金:";
cin>>tax;
assert(!cin.fail());
cout<<"请输入新的员工工资:";
cin>>salary;
assert(!cin.fail());
iter->m_dep=dep;
iter->m_insurance=ins;
iter->m_name=name;
iter->m_num=num;
iter->m_salary=salary;
iter->m_tax=tax;
cout<<"1 员工记录被成功修改.\n";
}
else
{
cout<<"没有找到姓名为\""<<name<<"\"的员工记录.\n";
}
}

void show_all()
{
if (emps.size()==0)
{
cout<<"员工记录为空.\n";
return;
}
cout<<"显示全体员工数据:\n";
cout<<"--------------------\n";
list<employee>::iterator iter;
for(iter=emps.begin();iter!=emps.end();iter++)
{
cout<<endl;
print(*iter);
cout<<endl;
}
cout<<"--------------------\n";
}

void show_name()
{
if (emps.size()==0)
{
cout<<"员工记录为空.\n";
return;
}
bool isfind=false;
string name;
cout<<"请输入要查询的员工姓名:";
cin>>name;
list<employee>::iterator iter;
for(iter=emps.begin();iter!=emps.end();iter++)
{
if (iter->m_name==name)
{
isfind=true;
cout<<"姓名为\""<<name<<"\"的员工记录已找到.\n";
print(*iter);
break;
}
}
if (!isfind)
{
cout<<"没有找到姓名为\""<<name<<"\"的员工.\n";
return;
}
}

void show_dep()
{
if (emps.size()==0)
{
cout<<"员工记录为空.\n";
return;
}
double isfind=0.00;
double total_salary=0.00;
string dep;
cout<<"请输入要查询的部门名称:";
cin>>dep;
cout<<"部门["<<dep<<"]的员工信息:\n";
cout<<"--------------------\n\n";
list<employee>::iterator iter;
for(iter=emps.begin();iter!=emps.end();iter++)
{
if (iter->m_dep==dep)
{
isfind++;
total_salary+=iter->m_salary;
print(*iter);
cout<<endl;
continue;
}
}
cout<<"--------------------\n";
if (isfind==0)
{
cout<<"没有找到名称为["<<dep<<"]的部门.\n";
}
else
{
cout<<"部门["<<dep<<"]工资统计:\n";
cout<<"工资总额:"<<total_salary<<endl;
cout<<"平均工资:"<<total_salary/isfind<<endl;
}

⑵ 课程设计,工资管理系统完整源代码

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>

#define MONTH_NUM 5 /* 最多的月份 */

struct worker
{
int number; /* 每个工人的工号 */
char name[15]; /* 每个工人的姓名 */
int salary[MONTH_NUM]; /* 每个工人M月的工资 */
int sum; /* 每个工人的总工资 */
float average; /* 每个工人的平均工资 */
struct worker *next;
};
typedef struct worker STU;

char Menu(void);
int Ascending(int a, int b);
int Descending(int a, int b);
void IntSwap(int *pt1, int *pt2);
void CharSwap(char *pt1, char *pt2);
void FloatSwap(float *pt1, float *pt2);
STU *AppendNode(STU *head, const int m);
STU *DeleteNode(STU *head, int nodeNum);
STU *ModifyNode(STU *head, int nodeNum, const int m);
STU *SearchNode(STU *head, int nodeNum);
STU *Appendsalary(STU *head, const int m);
void Totalsalary(STU *head, const int m);
void Printsalary(STU *head, const int m);
STU *Deletesalary(STU *head, const int m);
void Modifysalary(STU *head, const int m);
void Sortsalary(STU *head, const int m, int (*compare)(int a, int b));
void Searchsalary(STU *head, const int m);
void DeleteMemory(STU *head);

main()
{
char ch;
int m;
STU *head = NULL;

printf("输入要记录的月份(m<10):");
scanf("%d", &m);
while (1)
{
ch = Menu();
switch (ch)
{
case'1':head = Appendsalary(head, m);
Totalsalary(head, m);
break;
case'2':Printsalary(head, m);
break;
case'3':head = Deletesalary(head, m);
printf("\nAfter deleted\n");
Printsalary(head, m);
break;
case'4':Modifysalary(head, m);
Totalsalary(head, m);
printf("\nAfter modified\n");
Printsalary(head, m);
break;
case'5':Searchsalary(head, m);
break;
case'6':Sortsalary(head, m, Descending);
printf("\nsorted in descending order by sum\n");
Printsalary(head, m);
break;
case'7':Sortsalary(head, m, Ascending);
printf("\nsorted in ascending order by sum\n");
Printsalary(head, m);
break;
case'0':exit(0);
DeleteMemory(head);
printf("End of program!");
break;
default:printf("Input error!");
break;
}
}
}

char Menu(void)
{
char ch;

printf("\n管理工人的工资\n");
printf(" 1.添加记录\n");
printf(" 2.列出记录\n");
printf(" 3.删除记录\n");
printf(" 4.修改记录\n");
printf(" 5.查找记录\n");
printf(" 6.降序排列\n");
printf(" 7.升序排列\n");
printf(" 0.退出\n");
printf("请输入你的选择:");
scanf(" %c", &ch); /*在%c前面加一个空格,将存于缓冲区中的回车符读入*/
return ch;
}

STU *Appendsalary(STU *head, const int m)
{
int i = 0;
char c;

do{
head = AppendNode(head, m); /*向链表末尾添加一个节点*/
printf("你想添加一个新的记录吗(Y/N)?");
scanf(" %c",&c); /*%c前面有一个空格*/
i++;
}while (c=='Y' || c=='y');
printf("%d new nodes have been apended!\n", i);
return head;
}

STU *Deletesalary(STU *head, const int m)
{
int i = 0, nodeNum;
char c;

do{
printf("请输入你想删除的记录编号:");
scanf("%d", &nodeNum);
head = DeleteNode(head, nodeNum); /*删除工号为nodeNum的工人信息*/
Printsalary(head, m); /*显示当前链表中的各节点信息*/
printf("Do you want to delete a node(Y/N)?");
scanf(" %c",&c); /*%c前面有一个空格*/
i++;
}while (c=='Y' || c=='y');
printf("%d nodes have been deleted!\n", i);
return head;
}

void Modifysalary(STU *head, const int m)
{
int i = 0, nodeNum;
char c;

do{
printf("请输入你想修改的记录编号:");
scanf("%d", &nodeNum);
head = ModifyNode(head, nodeNum, m); /*修改工号为nodeNum的节点*/
printf("Do you want to modify a node(Y/N)?");
scanf(" %c",&c); /*%c前面有一个空格*/
i++;
}while (c=='Y' || c=='y');
printf("%d nodes have been modified!\n", i);
}

void Totalsalary(STU *head, const int m)
{
STU *p = head;
int i;

while (p != NULL) /*若不是表尾,则循环*/
{
p->sum = 0;
for (i=0; i<m; i++)
{
p->sum += p->salary[i];
}
p->average = (float)p->sum / m;
p = p->next; /*让p指向下一个节点*/
}
}

void Sortsalary(STU *head, const int m, int (*compare)(int a, int b))
{
STU *pt;
int flag = 0, i;

do{
flag = 0 ;
pt = head;
/*若后一个节点的总工资比前一个节点的总工资高,则交换两个节点中的数据
注意只交换节点数据,而节点顺序不变,即节点next指针内容不进行交换*/
while (pt->next != NULL)
{
if ((*compare)(pt->next->sum, pt->sum))
{
IntSwap(&pt->number, &pt->next->number);
CharSwap(pt->name, pt->next->name);
for (i=0; i<m; i++)
{
IntSwap(&pt->salary[i], &pt->next->salary[i]);
}
IntSwap(&pt->sum, &pt->next->sum);
FloatSwap(&pt->average, &pt->next->average);

flag = 1;
}
pt = pt->next;
}
}while(flag);
}

/*交换两个整型数*/
void IntSwap(int *pt1, int *pt2)
{
int temp;

temp = *pt1;
*pt1 = *pt2;
*pt2 = temp;
}

/*交换两个实型数*/
void FloatSwap(float *pt1, float *pt2)
{
float temp;

temp = *pt1;
*pt1 = *pt2;
*pt2 = temp;
}

/*交换两个字符串*/
void CharSwap(char *pt1, char *pt2)
{
char temp[15];

strcpy(temp, pt1);
strcpy(pt1, pt2);
strcpy(pt2, temp);
}

/*决定数据是否按升序排序,a<b为真,则按升序排序*/
int Ascending(int a, int b)
{
return a < b;
}

/* 决定数据是否按降序排序,a>b为真,则按降序排序 */
int Descending(int a, int b)
{
return a > b;
}

void Searchsalary(STU *head, const int m)
{
int number, i;
STU *findNode;

printf("请输入你想查找的记录编号:");
scanf("%d", &number);
findNode = SearchNode(head, number);
if (findNode == NULL)
{
printf("Not found!\n");
}
else
{
printf("\nNo.%3d%8s", findNode->number, findNode->name);
for (i=0; i<m; i++)
{
printf("%7d", findNode->salary[i]);
}
printf("%9d%9.2f\n", findNode->sum, findNode->average);
}
}

void Printsalary(STU *head, const int m)
{
STU *p = head;
char str[100] = {'\0'}, temp[3];
int i, j = 1;

strcat(str, "Number Name ");
for (i=1; i<=m; i++)
{
strcat(str, "salary");
itoa(i,temp, 10);
strcat(str, temp);
strcat(str, " ");
}
strcat(str," sum average");

printf("%s", str); /* 打印表头 */
while (p != NULL) /*若不是表尾,则循环打印*/
{
printf("\nNo.%3d%15s", p->number, p->name);
for (i=0; i<m; i++)
{
printf("%7d", p->salary[i]);
}
printf("%9d%9.2f", p->sum, p->average);
p = p->next; /*让p指向下一个节点*/
j++;
}
printf("\n");
}

STU *AppendNode(STU *head, const int m)
{
STU *p = NULL;
STU *pr = head;
int j;

p = (STU *)malloc(sizeof(STU)); /*为新添加的节点申请内存*/
if (p == NULL) /*若申请内存失败,则打印错误信息,退出程序*/
{
printf("No enough memory to alloc");
exit(0);
}

if (head == NULL) /*若原链表为空表,则将新建节点置为首节点*/
{
head = p;
}
else /*若原链表为非空,则将新建节点添加到表尾*/
{
/*若未到表尾,则继续移动指针pr,直到pr指向表尾*/
while (pr->next != NULL)
{
pr = pr->next;
}
pr->next = p; /*将新建节点添加到链表的末尾*/
}
pr = p; /*让pr指向新建节点*/
printf("Input node data......");
printf("\nInput number:");
scanf("%d", &p->number);
printf("Input name:");
scanf("%s", p->name);
for (j=0; j<m; j++)
{
printf("Input salary%d:", j+1);
scanf("%d", p->salary+j);
}

pr->next = NULL; /*将新建节点置为表尾*/
return head; /*返回添加节点后的链表的头节点指针*/
}

STU *ModifyNode(STU *head, int nodeNum, const int m)
{
int j;
STU *newNode;

newNode = SearchNode(head, nodeNum);
if (newNode == NULL)
{
printf("Not found!\n");
}
else
{
printf("Input the new node data:\n");
printf("Input name:");
scanf("%s", newNode->name);
for (j=0; j<m; j++)
{
printf("Input salary%d:", j+1);
scanf("%d", newNode->salary+j);
}
}
return head;
}

STU *DeleteNode(STU *head, int nodeNum)
{
STU *p = head, *pr = head;

if (head == NULL) /*链表为空,没有节点,无法删除节点*/
{
printf("No Linked Table!\n");
return(head);
}
/*若没找到节点nodeNum且未到表尾,则继续找*/
while (nodeNum != p->number && p->next != NULL)
{
pr = p;
p = p->next;
}
if (nodeNum == p->number) /*若找到节点nodeNum,则删除该节点*/
{
if (p == head) /*若待删节点为首节点,则让head指向第2个节点*/
{
head = p->next;
}
else /*若待删节点非首节点,则将前一节点指针指向当前节点的下一节点*/
{
pr->next = p->next;
}

free(p); /*释放为已删除节点分配的内存*/
}
else /*没有找到待删除节点*/
{
printf("This Node has not been found!\n");
}
return head; /*返回删除节点后的链表的头节点指针*/
}

STU *SearchNode(STU *head, int nodeNum)
{
STU *p = head;
int j = 1;

while (p != NULL) /*若不是表尾,则循环*/
{
if (p->number == nodeNum) return p;
p = p->next; /*让p指向下一个节点*/
j++;
}
return NULL;
}

void DeleteMemory(STU *head)
{
STU *p = head, *pr = NULL;

while (p != NULL) /*若不是表尾,则释放节点占用的内存*/
{
pr = p; /*在pr中保存当前节点的指针*/
p = p->next; /*让p指向下一个节点*/
free(pr); /*释放pr指向的当前节点占用的内存*/
}
}
凑合着用吧,一些缺少的功能自己加上去就行了。。。

⑶ 数据库课程设计—员工薪资管理系统

我给你讲个思路
表设计:
人事档案表
工资登记表(用做每月的工资登记)
考勤表(记录员工考勤数据,工资计算要参照这张表)
工资汇总表(每月对工资的结转数据流入此表)
系统用户表
系统权限分配表

表大体是这几张表

其它你说的这一套套大都过时了,现在做软件的需求分析都不是这个了,但学习下也是必须的,出来后就又学新东西了

⑷ 工资管理系统的设计与实现 一、 课程设计目的 1、 进一步掌握和利用

你好!这个设计要求有点多,程序什么时间要呢?可以尝试完成

⑸ 跪求C++课程设计:教师工资管理系统

#include <iostream>
#include <string>
#include <fstream>
#include <vector>

using namespace std;

const char* filename = "paid.txt";
class EmployeeData
{
public:
EmployeeData():id(0),name(),salary(0.0),allowance(0.0),bonus(0.0),dection(0.0){}
void Input();
void Print();
void Save() const;
void Load(ifstream& fin);

inline int Id() const{return id;}
inline string Name() const{return name;}
inline float Salary() const{return salary;}
inline float Allowance() const{return allowance;}
inline float Bonus() const{return bonus;}
inline float Dection() const{return dection;}
inline float NetPay() const
{return (salary+allowance+bonus-dection);}

private:
int id; // 职工号
string name; // 姓名
float salary; // 基本工资
float allowance; // 补贴
float bonus; // 奖金
float dection;// 扣除金额
};

void EmployeeData::Input()
{
cout<<"输入职工号:";
cin >> id;
cout<<"输入姓名:";
cin >> name;
cout<<"输入基本工资:";
cin >> salary;
cout<<"输入补贴金额:";
cin >> allowance;
cout<<"输入奖励金额:";
cin >> bonus;
cout<<"输入扣除金额:";
cin >> dection;
}

void EmployeeData::Print()
{
cout<<"职工号: \t"<< id<<endl;
cout<<"姓名: \t"<< name<<endl;
cout<<"基本工资:\t"<< salary<<endl;
cout<<"补贴金额:\t"<< allowance<<endl;
cout<<"奖励金额:\t"<< bonus<<endl;
cout<<"扣除金额:\t"<< dection<<endl;
cout<<"实发金额:\t"<< NetPay()<<endl;
}

void EmployeeData::Save() const
{
ofstream fout;
fout.open(filename, ios::app);
fout << id <<'\t' << name<<'\t' << salary<<'\t' <<allowance<<'\t'
<< bonus<<'\t' << dection<<'\t'<< NetPay()<<'\n';
fout.close();
}
void EmployeeData::Load(ifstream& fin)
{
//ifstream fin(filename);
int netpay(0);
fin >> id >> name >> salary >>allowance >> bonus >> dection >> netpay;
fin.close();
}

class DataManager
{
public:
DataManager(){entries.clear();}
~DataManager(){entries.clear();}
//菜单
void DisplayMenu();

private:
// 录入
void Input();
//查询
void Search();
//统计
void Stat();
//默认构造函数
EmployeeData Find(int id) const;
//添加
void Append(EmployeeData entry);
//保存
void Save() const;
//读取
void Load();

private:
vector<EmployeeData> entries;
};

void DataManager::Input()
{
cout << "[职工信息录入]\n请输入员工信息"<<endl;
EmployeeData entry;
entry.Input();
Append(entry);
cout << endl;
}

void DataManager::Search()
{
cout << "[信息查询]\n请输入员工的职工号:"<<endl;
int id(0);
cin >> id;
EmployeeData found=Find(id);
if(found.Id() == 0 && found.Name()=="")
{
cout << "无此员工号:" << id<< endl;
} else {
found.Print();
}
cout << endl;
}

void DataManager::Stat()
{
float s(0.0);
float a(0.0);
float b(0.0);
float d(0.0);
float p(0.0);
unsigned int count(entries.size());
for(unsigned int i(0);i<count;i++)
{
s+=entries.at(i).Salary();
a+=entries.at(i).Allowance();
b+=entries.at(i).Bonus();
d+=entries.at(i).Dection();
p+=entries.at(i).NetPay();
}
cout << " \t\t总金额\t平均金额"<<endl;
cout << "----------------------------------"<<endl;
cout << "基本工资\t"<<s<<"\t"<<s/count<<endl;
cout << "补贴金额\t"<<a<<"\t"<<a/count<<endl;
cout << "奖励金额\t"<<b<<"\t"<<b/count<<endl;
cout << "扣除金额\t"<<d<<"\t"<<d/count<<endl;
cout << "实发工资\t"<<p<<"\t"<<p/count<<endl;
cout << endl;
}

EmployeeData DataManager::Find(int id) const
{
EmployeeData res;
for(unsigned int i(0);i<entries.size();i++)
{
if(entries.at(i).Id() == id)
{
res = entries.at(i);
break; // for
}
}
return res;
}

void DataManager::Append(EmployeeData entry)
{
entries.insert(entries.end(), entry);
}

void DataManager::Save() const
{
ofstream fout;
fout.open(filename, ios::app );
fout.clear(); // 重新保存
fout << entries.size() <<'\t'<< endl; //保存总数
fout.close();
for(unsigned int i(0);i<entries.size();i++)
{
entries.at(i).Save();
}
}

void DataManager::Load()
{
ifstream fin(filename);
unsigned int count(0);
fin >> count;

entries.clear();
for(unsigned int i(0);i<count;i++)
{
EmployeeData entry;
entry.Load(fin);
Append(entry);
}
fin.close();
}

void DataManager::DisplayMenu()
{
int opt(0);
Load();
do
{
cout << "1.职工信息录入"<<endl;
cout << "2.信息查询"<<endl;
cout << "3.工资统计"<<endl;
cout << "4.退出"<<endl;
cin >> opt;
switch(opt)
{
case 1:
Input();
Save();
break;
case 2:
Search();
break;
case 3:
Stat();
break;
}
} while (opt!=4);
}

int main()
{
DataManager dm;

dm.DisplayMenu();
return 0;
}

⑹ 工资管理信息系统课程设计开发背景怎么写

我认为中心来应该是:
(在市场经自济的大环境下,越来越多的人士逐渐认识到用计算机技术进行各类管理,交流的便捷,其中最突出的要算企事业单位的人事工资管理了,为了提高人事工资管理效率,减轻劳动强度,提高信息处理速度和准确性,在对其组成结构和系统功能进行了全面地分析,提出了人事工资管理系统的实现和解决方案,该方案利用计算机支持高效率地完成人事工资管理的日常事务,是适应现代企事业单位制度要求、推动企事业单位人事工资管理走向科学化、规范化的必要条件。)
设计的思路:
应该以Visual Basic6.0为开发语言和ACCESS2000为数据库以及其他第三方控件等软件作为设计工具,以工资为对象,开发的一个能够满足企事业单位的工资管理的要求的“人事工资管理系统”。
要求本系统具有完成单位人员工资管理的全过程,包括用户管理,员工管理,维护不同职务,职称,其他工资的工资标准以及浏览与结算和查询等。

关键词:工资管理系统; VB; ACCESS

⑺ C++课程设计:工资管理系统

这个C++管理系统到网上搜索一下嘛,专门写很麻烦的,而且除了交作业根本没什么价值。
只要你能懂一点基本的C++知识,把下载的源码简单修改一下就可以了。

⑻ 跪求C++课程设计,职工工资管理系统的设计代码和Word模板报告

#include<iostream.h>
#include<string.h>
#include <stdlib.h>
#include<stdio.h>
struct Staff
{
int number;
char name[10];
short sex;
int age;
int type;
int school;
int wage;
char address[20];
long tele;
};
int service()
{
int a;
cout<<"\t\t\t欢迎使用职工管理系统:"<<endl;
cout<<"请选择您所要的服务:\n 1 录入职工信息\n 2 浏览职工信息\n 3 查询和排序功能\n 4 职工信息删除、修改功能 \n 5 退出系统"<<endl;
cin>>a;
system("cls");
return a;
}
void print()//输入职工信息
{
FILE *p=fopen("stuff.bin","ab+");
Staff staff;
cout<<"工号\t姓名\t性别\t年龄\t类型\t学历\t工资\t住址\t电话"<<endl;
rewind(p);
fread(&staff,sizeof(staff),1,p);
for(;!feof(p);)
{
cout<<staff.number<<'\t'<<staff.name<<'\t';
if(staff.sex==0)
cout<<"女"<<'\t';
else
cout<<"男"<<'\t';
cout<<staff.age<<'\t';
if(staff.type==1)
cout<<"教师"<<'\t';
else if(staff.type==2)
cout<<"实验员"<<'\t';
else if(staff.type==3)
cout<<"行政人员"<<'\t';
else if(staff.type==4)
cout<<"教师兼职实验员"<<'\t';
else
cout<<"行政人员兼职教师"<<'\t';
if(staff.school==1)
cout<<"小学"<<'\t';
else if(staff.school==2)
cout<<"中学"<<'\t';
else if(staff.school==3)
cout<<"中专"<<'\t';
else if(staff.school==4)
cout<<"高州"<<'\t';
else if(staff.school==5)
cout<<"大专"<<'\t';
else
cout<<"大学"<<'\t';
cout<<staff.wage<<'\t'<<staff.address<<'\t'<<staff.tele<<endl;
fread(&staff,sizeof(staff),1,p);
}
fclose(p);

}
void alter()
{
int a;
cout<<"1 修改数据\n2 删除数据"<<endl;
cin>>a;
if(a==1)
{
FILE *p=fopen("stuff.bin","rb+");
if(p==NULL)
{
cout<<"文件没有建立"<<endl;
exit(1);
}
cout<<"输入要修改的工号"<<endl;
int b;
cin>>b;
Staff staff;
fread(&staff,sizeof(staff),1,p);
for(;!feof(p);)
{
if(staff.number==b)
{
break;
}
fread(&staff,sizeof(staff),1,p);
}
int f=sizeof(staff);
fseek(p,-f,1);
if(staff.number!=b)
{
cout<<"此成员不存在"<<endl;
return;
}
cout<<"你所要修改的选项:"<<endl;
cout<<"1工号\t2姓名\t3性别\t4年龄\t5类型\t6学历\t7工资\t8住址\t9电话"<<endl;
int c;
cin>>c;
for(;;)
{
if(c==1)
{
cout<<"请输入学号"<<endl;
cin>>staff.number;
fwrite(&staff,sizeof(staff),1,p);
cout<<"操作成功"<<endl;
break;
}
else if(c==2)
{
cout<<"请输入姓名"<<endl;
cin>>staff.name;
fwrite(&staff,sizeof(staff),1,p);
cout<<"操作成功"<<endl;
}
else if(c==3)
{
cout<<"请输入性别"<<endl;
cin>>staff.sex;
fwrite(&staff,sizeof(staff),1,p);
cout<<"操作成功"<<endl;
break;
}
else if(c==4)
{
cout<<"请输入年龄"<<endl;
cin>>staff.age;
fwrite(&staff,sizeof(staff),1,p);
cout<<"操作成功"<<endl;
break;
}
else if(c==5)
{
cout<<"请输入类型"<<endl;
cin>>staff.type;
fwrite(&staff,sizeof(staff),1,p);
cout<<"操作成功"<<endl;
break;
}
else if(c==6)
{
cout<<"请输入学历"<<endl;
cin>>staff.school;
fwrite(&staff,sizeof(staff),1,p);
cout<<"操作成功"<<endl;
break;
}
else if(c==7)
{
cout<<"请输入工资"<<endl;
cin>>staff.wage;
fwrite(&staff,sizeof(staff),1,p);
cout<<"操作成功"<<endl;
break;
}
else if(c==8)
{
cout<<"请输入地址"<<endl;
cin>>staff.address;
fwrite(&staff,sizeof(staff),1,p);
cout<<"操作成功"<<endl;
break;
}
else if(c==9)
{
cout<<"请输入电话"<<endl;
cin>>staff.tele;
fwrite(&staff,sizeof(staff),1,p);
cout<<"操作成功"<<endl;
break;
}
else
{
cout<<"请重新输入"<<endl;
}
}
fclose(p);
}
else
{
FILE *p=fopen("stuff.bin","rb+");
Staff staff[500];
fread(staff,sizeof(Staff),1,p);
for(int i=1;!feof(p);i++)
{
fread(&staff[i],sizeof(Staff),1,p);
}
i--;
cout<<"输入要删除的工号"<<endl;
int b;
cin>>b;
for(int j=0;j<i;j++)
{
if(staff[j].number==b)
{
break;
}
}
if(staff[j].number!=b)
{
cout<<"没有这个人员"<<endl;
return;
}
fclose(p);
p=fopen("stuff.bin","wb+");
for(int k=0;k<i;k++)
{
if(staff[k].number!=staff[j].number)
{
fwrite(&staff[k],sizeof(Staff),1,p);
}

}
cout<<"成功删除"<<endl;
fclose(p);
}

}
void find()
{
FILE *p=fopen("stuff.bin","rb+");
Staff staff[1000];
fread(staff,sizeof(Staff),1,p);
for(int i=1;!feof(p);i++)
{
fread(&staff[i],sizeof(Staff),1,p);
}
//查询和排序功能:按工资查询和按学历查询或按年龄等查询
cout<<"请选择你需要的服务\n1 工资查询\n2 年龄查询"<<endl;
int a;
cin>>a;
for(;;)
{
if(a==1)
{
cout<<"请输入你要查询的工资范围(从小到大)"<<endl;
int begin,end;
cin>>begin>>end;
for(int j=0;j<i;j++)
{
if(staff[j].wage>=begin&&staff[j].wage<=end)
{
cout<<staff[j].number<<'\t'<<staff[j].name<<'\t';
if(staff[j].sex==0)
cout<<"女"<<'\t';
else
cout<<"男"<<'\t';
cout<<staff[j].age<<'\t';
if(staff[j].type==1)
cout<<"教师"<<'\t';
else if(staff[j].type==2)
cout<<"实验员"<<'\t';
else if(staff[j].type==3)
cout<<"行政人员"<<'\t';
else if(staff[j].type==4)
cout<<"教师兼职实验员"<<'\t';
else
cout<<"行政人员兼职教师"<<'\t';
if(staff[j].school==1)
cout<<"小学"<<'\t';
else if(staff[j].school==2)
cout<<"中学"<<'\t';
else if(staff[j].school==3)
cout<<"中专"<<'\t';
else if(staff[j].school==4)
cout<<"高州"<<'\t';
else if(staff[j].school==5)
cout<<"大专"<<'\t';
else
cout<<"大学"<<'\t';
cout<<staff[j].wage<<'\t'<<staff[j].address<<'\t'<<staff[j].tele<<endl;
}
}
}
else if(a==2)
{
cout<<"请输入要查询的年龄范围"<<endl;
int begin,end;
cin>>begin>>end;
for(int j=0;j<i;j++)
{
if(staff[j].age>=begin&&staff[j].age<=end)
{
cout<<staff[j].number<<'\t'<<staff[j].name<<'\t';
if(staff[j].sex==0)
cout<<"女"<<'\t';
else
cout<<"男"<<'\t';
cout<<staff[j].age<<'\t';
if(staff[j].type==1)
cout<<"教师"<<'\t';
else if(staff[j].type==2)
cout<<"实验员"<<'\t';
else if(staff[j].type==3)
cout<<"行政人员"<<'\t';
else if(staff[j].type==4)
cout<<"教师兼职实验员"<<'\t';
else
cout<<"行政人员兼职教师"<<'\t';
if(staff[j].school==1)
cout<<"小学"<<'\t';
else if(staff[j].school==2)
cout<<"中学"<<'\t';
else if(staff[j].school==3)
cout<<"中专"<<'\t';
else if(staff[j].school==4)
cout<<"高州"<<'\t';
else if(staff[j].school==5)
cout<<"大专"<<'\t';
else
cout<<"大学"<<'\t';
cout<<staff[j].wage<<'\t'<<staff[j].address<<'\t'<<staff[j].tele<<endl;
}
}
}
else
cout<<"输入有误,请重新输入"<<endl;
}

}
void rank()
{
FILE *p=fopen("stuff.bin","rb+");
Staff staff[1000];
fread(staff,sizeof(Staff),1,p);
for(int i=1;!feof(p);i++)
{
fread(&staff[i],sizeof(Staff),1,p);
}
i--;
fclose(p);
cout<<"请选择你需要的服务\n1 工资排序\n2 年龄排序"<<endl;
int a;
p=fopen("stuff.bin","wb+");
for(;;)
{
cin>>a;
if(a==1)
{
for(int j=0;j<i-1;j++)
{
for(int k=0;k<i-j;k++)
{
if(staff[k].wage<staff[k+1].wage)
{
Staff con;
con=staff[k+1];
staff[k+1]=staff[k];
staff[k]=con;
}
}
}
fwrite(staff,sizeof(Staff),i,p);
cout<<"排序已经完成"<<endl;
fclose(p);
break;
}
else if(a==2)
{
for(int j=0;j<i-1;j++)
{
for(int k=0;k<i-j;k++)
{
if(staff[k].age<staff[k+1].age)
{
Staff con;
con=staff[k+1];
staff[k+1]=staff[k];
staff[k]=con;
}
}
}
fwrite(staff,sizeof(Staff),i,p);
cout<<"排序已经完成"<<endl;
fclose(p);
break;
}
else
cout<<"请重新输入"<<endl;
}
}
void input(int b)
{
FILE *p=fopen("stuff.bin","ab+");
Staff staff;
int i;
cout<<"请输入依次员工的工号 "<<endl;
cin>>staff.number;
cout<<"请输入依次员工的姓名"<<endl;
cin>>staff.name;
cout<<"请输入依次员工的性别(男1,女0)"<<endl;
for(;;)
{
cin>>staff.sex;
if(staff.sex==0||staff.sex==1)
break;
else
cout<<"输入有误,请重新输入"<<endl;
}
cout<<"请输入依次员工的年龄"<<endl;
cin>>staff.age;
staff.type=b;
cout<<"请选择依次员工的学历\n1 小学\n2 中学\n3中专 \n4 高中\n5 大专\n6 大学"<<endl;
for(;;)
{
cin>>staff.school;
if(staff.school==1||staff.school==2||staff.school==3||staff.school==4||staff.school==5||staff.school==6)
break;
else
cout<<"你输入有误,数字范围为1-6,请重新输入"<<endl;
}
switch(b)
{
fseek(p,0L,2);
case 1:
cout<<"请输入教师的月工作量"<<endl;
cin>>i;
staff.wage=1000+(i-24)*30;
break;
case 2:
staff.wage=800+150; break;
case 3:
staff.wage=900+250;
break;
case 4:
cout<<"请输入教师兼职实验员的月工作量"<<endl;
cin>>i;
staff.wage=1000+(i-12)*30+150;//基本工资(1000)+课时费[(月工作量-12)X30]+实验室补助(150);
break;
case 5:
cout<<"请输入行政人员兼职教师的月工作量"<<endl;
cin>>i;
staff.wage=900+210+i*30;//行政人员兼职教师:基本工资(900)+行政补贴(210)+课时费(月工作量X30);
break;
default://不会出现;
cout<<"您输入有误";
}
cout<<"请输入依次员工的住址"<<endl;
cin>>staff.address;
cout<<"请输入依次员工的电话"<<endl;
cin>>staff.tele;
fwrite(&staff,sizeof(staff),1,p);
fclose(p);

}
void False()
{
cout<<"你输入有误,数字范围为1-5,请重新输入"<<endl;
}
int choice()
{
int i;
cout<<"\t\t\t\t\t请选择您输入的职工类型:\n 1 教师\n 2 实验员 \n 3 行政人员 \n 4 教师兼职实验员 \n 5 行政人员兼职教师"<<endl;
for(;;)
{
cin>>i;
if(i==1||i==2||i==3||i==4||i==5)
{
break;

}
else
{
cout<<"输入有误,请重新输入"<<endl;
continue;
}
}
return i;
}
void main()
{

for(int i=0;;i++)
{
int a;
a=service();
if(a==1)
{
int b;
b=choice();
input(b);
}
else if(a==2)
{
print();
}
else if(a==3)
{
cout<<"请输入你所需要的服务\n1 查询\n2 排序"<<endl;
for(;;)
{
int b;
cin>>b;
if(b==1)
{
find();
break;
}
else if(b==2)
{
rank();
break;
}
else
cout<<"请重新输入"<<endl;
}

}
else if(a==4)
{
alter();
}
else if(a==5)
{
exit(1);
}
else
{
False();
continue;
}
}
}

代码先送到,能用再附报告。

⑼ 跪求C语言课程设计 工资管理系统

用数据库做个exe程序,很少的代码,再用C的系统调用来执行它.这样非常快速,还漂亮,保证可以气死老师.

热点内容
武汉大学学生会辅导员寄语 发布:2021-03-16 21:44:16 浏览:612
七年级学生作文辅导学案 发布:2021-03-16 21:42:09 浏览:1
不屑弟高考成绩 发布:2021-03-16 21:40:59 浏览:754
大学毕业证会有成绩单 发布:2021-03-16 21:40:07 浏览:756
2017信阳学院辅导员招聘名单 发布:2021-03-16 21:40:02 浏览:800
查询重庆2018中考成绩查询 发布:2021-03-16 21:39:58 浏览:21
结业考试成绩怎么查询 发布:2021-03-16 21:28:40 浏览:679
14中医医师资格笔试考试成绩查分 发布:2021-03-16 21:28:39 浏览:655
名著赏析课程标准 发布:2021-03-16 21:27:57 浏览:881
北京大学商业领袖高端培训课程 发布:2021-03-16 21:27:41 浏览:919