當前位置:首頁 » 課程大全 » 工資管理系統課程設計

工資管理系統課程設計

發布時間: 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