資源簡介
題目:小型公司工資管理系統(tǒng)設(shè)計
設(shè)計說明與要求:
1、公司主要有4類人員:經(jīng)理、技術(shù)員、銷售員、銷售經(jīng)理。要求存儲這些人的職工號、姓名、月工資、崗位、年齡、性別等信息。
2、工資的計算方法:
A、經(jīng)理:固定月薪為8000;
B、技術(shù)員:工作時間*小時工資(100元每小時);
C、銷售員:銷售額*4%提成;
D、銷售經(jīng)理:底薪(5000)+所轄部門銷售額總額*0.5%;
(3)輸入數(shù)據(jù)要求每類人員不能少于4人,并按以下格式輸出:
職工號 姓名 性別 年齡 崗位 工資 排名
及某部門經(jīng)理所轄部門各售貨員的業(yè)績及自己的工資表:
(4)菜單要求:要有一個菜單,用于選擇各項功能,其中
1) 數(shù)據(jù)錄入:輸入各種數(shù)據(jù);
2) 數(shù)據(jù)統(tǒng)計:各銷售經(jīng)理的工資計算及最終按工資進(jìn)行的冒泡排序;
3) 數(shù)據(jù)打印:打印上述表格;
4)數(shù)據(jù)備份:把相關(guān)數(shù)據(jù)寫入文件;
5)退出:推出本系統(tǒng);

代碼片段和文件信息
#include
#include
#include
#include
fstream?myfile;
//*******************************************************
class?Employee//雇員類
{
protected:
?int?num;
?int?age;
?char?name[10];
?double?income;
?char?sex;
public:
?
?virtual?void?Set()
?{
?????cout<<“其姓名:“;
??cin>>name;
?????cout<<“性別(m/w):“;
?????cin>>sex;
?????cout<<“年齡:“;
?????cin>>age;
?}
?void?Get()
?{
?????cout<<“┣━━━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━━┫“< ?????cout<<“┃“< ?????int?n=10-strlen(name);
?????for(int?i=0;i ?????cout<<“?“;
?????cout< ?}
};
//*******************************************************
class?Tech:public?Employee//技術(shù)員類
{
protected:
?double?hour;
?double?per;
public:
?void?Set()
?{
?????cout<<“技術(shù)員編號:“;
?????cin>>num;
?????cout< ?????Employee::Set();
?????cout< ?????cout<<“工作時間:“;
?????cin>>hour;
?????per=100;
?????income=hour*per;
?}
?void?beifen()
?{
?????myfile<<“┣━━━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━━┫“< ?????int?n=10-strlen(name);
?????myfile<<“┃“< ?????for(int?i=0;i ?????myfile< ?}
?
};
//*******************************************************
class?Seller:public?Employee//銷售員類
{
protected:
?double?salary;//銷售額
?int?ss;//所屬經(jīng)理編號
public:
?double?Gets()?{?return?salary;}
?void?Set()
?{
?????cout<<“銷售員編號:“;
?????cin>>num;
?????Employee::Set();
?????cout<<“銷售額:“;
?????cin>>salary;
?????cout<<“所屬經(jīng)理編號:“;
?????cin>>ss;
?????income=salary*0.04;
?}
?void?Get1()
?{
?????int?n=10-strlen(name);
?????cout<<“┃“< ?????for(int?i=0;i ?????cout< ?}
?void?beifen()
?{?
??int?n=10-strlen(name);
?????myfile<<“┃“< ?????for(int?i=0;i ?????myfile< ?}
????void?beifen1()
?{
?????myfile<<“┃“< ?????int?n=10-strlen(name);
?????for(int?i=0;i ?????myfile<<“?“;
?????myfile< ?}
};
//*******************************************************
class?Manager:public?Employee//經(jīng)理類
{
protected:
public:
?void?Set()
?{
?????cout<<“經(jīng)理的編號:“;
?????cin>>num;
?????Employee::Set();
?????income=8000;
?}
?void?beifen()
?{
?????myfile<<“┣━━━━━╋━━━━━╋━━━━━╋━━━━━╋━━━━━┫“< ?????myfile<<“┃“< ?????int?n=10-strlen(name);
?????for(int?i=0;i ?????myfile<<“?“;
?????myfile< ???}
};
//______________________________________________________
class?Xmanager:public?Manager//銷售經(jīng)理類
{
protected:
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????12665??2010-01-04?21:12??小型公司工資管理系統(tǒng)設(shè)計\cms.cpp
?????文件???????3365??2010-01-04?21:12??小型公司工資管理系統(tǒng)設(shè)計\cms.dsp
?????文件????????514??2010-01-04?21:16??小型公司工資管理系統(tǒng)設(shè)計\cms.dsw
?????文件??????33792??2010-01-04?21:16??小型公司工資管理系統(tǒng)設(shè)計\cms.ncb
?????文件??????48640??2010-01-04?21:16??小型公司工資管理系統(tǒng)設(shè)計\cms.opt
?????文件????????735??2010-01-04?21:13??小型公司工資管理系統(tǒng)設(shè)計\cms.plg
?????文件?????258108??2010-01-04?21:13??小型公司工資管理系統(tǒng)設(shè)計\Debug\cms.exe
?????文件?????307524??2010-01-04?21:13??小型公司工資管理系統(tǒng)設(shè)計\Debug\cms.ilk
?????文件??????73747??2010-01-04?21:13??小型公司工資管理系統(tǒng)設(shè)計\Debug\cms.obj
????I.A....????297568??2010-01-04?21:13??小型公司工資管理系統(tǒng)設(shè)計\Debug\cms.pch
?????文件?????484352??2010-01-04?21:13??小型公司工資管理系統(tǒng)設(shè)計\Debug\cms.pdb
?????文件??????50176??2010-01-04?21:14??小型公司工資管理系統(tǒng)設(shè)計\Debug\vc60.idb
?????文件??????69632??2010-01-04?21:13??小型公司工資管理系統(tǒng)設(shè)計\Debug\vc60.pdb
?????目錄??????????0??2010-01-04?21:13??小型公司工資管理系統(tǒng)設(shè)計\Debug
?????目錄??????????0??2010-01-04?21:16??小型公司工資管理系統(tǒng)設(shè)計
-----------?---------??----------?-----??----
??????????????1640818????????????????????15
- 上一篇:SJFFCFSHRRN
- 下一篇:vs+Tin+等值線繪制
評論
共有 條評論