employee.h
来自「职工管理系统:包括职工查找、排序、编辑等」· C头文件 代码 · 共 91 行
H
91 行
//=================================employee.h===============================================
extern int employee_number; //职工数;
class Employee //职工信息
{
public:
char ID[20]; //工作号码
char name[20]; //姓名;
char sex; //性别;
char edu_level; //学历;
char duty; //职务;
int year_Born; //出生年份;
int month_Born; //出生月份;
int year_W; //工作年份;
int month_W; //工作月份;
char tel[20]; //电话号码;
};
class Operat //职工信息管理类;
{
public:
Operat(); //构造函数,
Employee * Create(); //创建职工信息;
void display(); //显示职工信息;
void find1(); //查询职工信息;
void find2(); //查询职工信息;
void change(); //修改职工信息
void insert(); //插入职工信息;
void dele(); //删除职工信息;
};
class Sort //排序基类;
{
public:
virtual void sortf(Employee *,int ){}; //排序虚函数;
};
class BubbleSort:public Sort //冒泡排序子类;
{
public:
void sortf(Employee *,int);
};
class InsertSort:public Sort //折半查找排序子类;
{
public:
void sortf(Employee *,int);
};
class QuickSort:public Sort //快速排序子类;
{
public:
void sortf(Employee *,int);
void QSort (Employee * , int , int );
int Partition (Employee *, int , int);
};
class HeapSort //堆排序子类;
{
public:
void sortf(Employee *,int);
void HeapAdjust (Employee *, int , int );
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?