# include
# include
# include
using namespace std;
Class staff/information/worker class definition
{
Protected:
Char name [10].//worker name
Int salary;//worker pay
Public:
Char * getname ()
{return name; }
Int getsalary ()
{return salary; }
};
The class JSJL: public staff//technical manager
{
Protected:
Int level;//business level
Public:
Int getlevel ()
{return level; }
Void input1 ()//input information technology manager
{
Cout<" Technical manager's name: ";
Cin> The name;
Cout<" Business level: ";
Cin> Level;
Salary=5000 + 1000 * level;
Cout
};
The class XSJL: public staff/sales manager/
{
Protected:
Int profit;//total by
Public:
Int getprofit ()
{return profit; }
Void input2 ()//input information sales manager
{
Cout<" Sales manager's name: ";
Cin> The name;
Cout<" Total by: ";
Cin> Profit;
Salary=5000 + profit (* 3)/1000;
Cout
};
The class jsry: public staff//technicians
{
Protected:
Int time;//work time
Public:
Int gettime ()
{the return time. }
Void input3 ()//input information technicians
{
Cout<" Technical personnel name: ";
Cin> The name;
Cout<" Working time: ";
Cin> time;
Salary=40 * time;
Cout
};
The class xsry: public staff//sales staff
{
Protected:
Int sale; Total sales of the//
Public:
Int getsale ()
{return sale; }
Void input4 ()//recorded sales personnel information
{
Cout<" Sales staff name: ";
Cin> The name;
Cout<" Sales: ";
Cin> Sale;
Salary=(5 * sale)/100;
Cout
};
The class wm: public secretarial staff//
{
Protected:
Int sale;//bonus
Public:
Int getsale ()
{return sale; }
Void input5 ()//input information secretary
{
Cout<" Secretary's name: ";
Cin> The name;
Cout<" Bonus: ";
Cin> Sale;
Salary=4000 + sale;
Cout
};
JSJL a, [2].
XSJL b [2];
Jsry c [6];
Xsry d [6].
Wm e [4];
Void the use ();//use
Void input ();//input information worker function declaration
Void the show ();//show the worker information function declaration
Void the save ();//archive
Void getsave ();//open the archive
Void the account (s);//calculate the month the company always pay
Int main ()
{
Int the select;
While (1)
{
System (" CLS ");
Cout<" \ t * * * * * * * * * * * * * * * * * * welcome to * * * * * * * * * * * * * * * * * * \ n ";
Cout<" \ t * * * * * * * * * * * * * * * * wages management system management system * * * * * * * * * * * * * * * * \ n ";
Cout<" __________________________________________ \ t * * \ n ";
Cout<" Introduce usage \ t * 1 * \ n ";
Cout<" \ t * 2 input information worker * \ n ";
Cout<" \ t * 3 shows the worker information * \ n ";
Cout<" \ t * 4 archive * \ n ";
Cout<" \ t * 5 open archive * \ n ";
Cout<" Exit \ t * 6 * \ n ";
Cout<" __________________________________________ \ t * * \ n ";
Cout<" \ t you want to input number is (1, 6) : ";
Cin> The select;
If (select==0) break;
The switch (select) {
Case 1:
System (" CLS ");
The use ();//use
system("pause");
break;
Case 2:
System (" CLS ");
The input ();//input information staff
system("pause");
break;
Case 3:
System (" CLS ");
show();//call the show function queries the worker information
system("pause");
break;
Case 4:
System (" CLS ");
Save ();//call the save function to save the worker information
system("pause");
break;
Case 5:
System (" CLS ");
Getsave ();//call del function delete employee information
system("pause");
break;
Default:
System (" CLS ");
Cout<" Without this option, please choose again!"
}
return 0;
}
Void input ()//function of the input information worker
{
for(int i=0; i<2; I++) a [I] input1 ();
for(i=0; i<2; I++) b [I] input2 ();
for(i=0; i<6; I++) c [I] input3 ();
for(i=0; i<6; I++) d [I] input4 ();
for(i=0; i<4. I++) e [I] input5 ();
The account (s);
}
Void the show ()//show all worker information function
{
Cout
{
Cout
Cout<'\ n';
Cout
{
Cout
Cout<'\ n';
Cout
{
Cout
Prev:The queue