C++课设简单教职工管理系统

C++简单教职工管理系统

梦是突然醒的,就像泡沫一样越吹越大,最后破灭消失。无数时刻感觉自己吊在悬崖边上,抓着最后一根救命稻草,当然可以松开紧握的拉出血痕的双手,但是就这样草草收场,我不甘心。
无数焦虑失眠的夜晚,凌晨三四点的路灯,一把脱落的头发,往死里奔跑时喉咙散发出的血腥味,试着努力发现光亮,追寻光照的方向,对生而破碎的梦缝缝补补,渐渐清晰。
没关系,失去了太多,反而没什么害怕失去的了,破釜沉舟。

#include<iostream>
#include<fstream> 
#include<string>
#include<windows.h>
#include<stdlib.h>
#include<iomanip>
using namespace std;
void zhucaidan(); 

class Employee//职员 
{
   
	public:
	string number,name,job,gender;
	string ch1;
	int age;
	double salary,temp; //temp存储工作时间,销售额等临时信息 
	Employee()
	{
   
		number="000";
		name="iii";
		job="000";
		gender="0";
		ch1="0";
		age=0;
		salary=0;
		temp=0;
	}	
};

class Sale:public Employee
{
   
	public:
		Sale *next;
};

class Manager:public Employee
{
   
	public:
		Manager *next;
};


class Salemanager:public Employee
{
   
	public:
		Salemanager *next;
};

class Technology:public Employee
{
   
	public:
		Technology *next;
};

class operate
{
   
	public:
		Sale *head1;
		Manager *head2;
		Salemanager *head3;
		Technology *head4;
	operate(){
   
		head1=NULL;
		head2=NULL;
		head3=NULL;
		head4=NULL;
	}
	template<typename TY>
	void input1(TY *y); 
	void input2();
	void output1();//输出 
	template <typename T>
	void output2(T *s);
	void statistic();
	template <typename B>
	void swap(B *r); 
	void infile1();//备份 
	template<typename TY>
	void infile2(TY *s);
	void salarycal();//销售经理工资的计算
};

template<typename TY>
void operate::input1(TY *y)//基本信息输入 
{
   
	TY *tem;
	tem=y;
	cout<<"请输入职工号:"<<endl;
	cin>>tem->number;
	cout<<"请输入姓名:"<<endl;
	cin>>tem->name;
	cout<<"请输入性别:"<<endl;
	cin>>tem->gender;
	cout<<"请输入岗位:"<<endl;
	cin>>tem->job;
	cout<<"请输入年龄:"<<endl;
	cin>>tem->age;	
}
		
void operate::input2()//人员的判断和信息输入 
{
   
	int a=1;
	while(a)
	{
   
		system("cls");
		cout<<"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<endl;
        cout<<"|                                                            |"<<endl;
        cout<<"|       1.技术员  2.销售员 3.经理 4.销售经理 0.主菜单        |"<<endl;
        cout<<"|                                                            |"<<endl;
        cout<<"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"<<endl;
        cout<<"请选择要录入哪个岗位的信息: ";
		cin>>a;
		switch(a)
 		{
   
			case 1:{
   
						system("cls");
						cout<<"------------------------------------------------------"<<endl;
						cout<<"                *****技术员信息管理*****"<<endl; 
						cout<<"------------------------------------------------------"<<endl;
						cout<<"请问要输入多少位技术员的信息 :"<<endl;
						cout<<"------------------------------------------------------"<<endl;
						int num;
						cin>>num;
						if(num==1)
			            {
   
			            	system("cls");
			            	Technology *p;
						    p=new Technology;
							head4=p;									
						    p->next=NULL;
						    cout<<"请输入第一位技术员的信息:"<<endl;
			            	input1<Technology>(p);
						    cout<<"请输入工作时长:"<<endl;
					        cin>>p->temp;
					        p->salary=p->temp*100;
					     	p->ch1="tt";
						    system("cls");						   	
						}
						if(num>1)
						{
   
								system("cls");
								Technology *p,*q;
							    p=new Technology;
							    head4=p;
							    p->next=NULL;
							    q=p;
							    cout<<
  • 4
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
C++课程设计-教职工信息管理系统源代码 教职工信息管理系统源码 #include<iostream.h> #include<string.h> #include<fstream.h> #include<stdlib.h> #define maxsize 100 fstream iofile; //文件指针 class Time //时间类 { public: int year; int month; int day; }; class Telem //个人信息 { public: char name[20]; char sex[10]; Time birthtime; //组合Time类 char num[20]; char wage[20]; Time worktime; int year; char department[20]; friend istream& operator>>(istream& input,Telem& T); friend ostream& operator<<(ostream& output,Telem& T); friend int operator-(Time & t1,Time & t2); }; class People:virtual public Telem //雇员类 { public: People(); virtual void AddF()=0; //添加 virtual void Addall()=0; virtual void Add()=0; { int i; for(i=0;i<length;i++) cout<<data[i]; } void People::Displaypart(char p[])//引用数组 { int i,c; for(i=0;i<length;i++) if(strcmp(data[i].wage,p)==0) { cout<<"输出选择姓名1 性别2 编号3 工资4 出生日期5 工作时间6 年龄7 系别8 退出选择9"<<endl; while(cin>>c) { switch(c) { case 1: cout<<"姓名:"<<data[i].name<<endl;break; case 2: cout<<"性别:"<<data[i].sex<<endl;break; case 3: cout<<"编号:"<<data[i].num<<endl;break; case 4: cout<<"工资:"<<data[i].wage<<endl;break; case 5: cout<<"出生日期:"<<data[i].birthtime.year<<" "<<data[i].birthtime.month<<" "<<data[i].birthtime.day<<" "<<endl;break; case 6: cout<<"工作时间:"<<data[i].worktime.year<<" "<<data[i].worktime.month<<" "<<data[i].worktime.day<<" "<<endl;break; case 7: cout<<"年龄:"<<data[i].year<<endl;break; case 8: cout<<"系别:"<<data[i].department<<endl;break; case 9: goto loop; default:cout<<"操作错误......"<<endl; } } loop:; } } void People::Findname(char n[]) //引用 { int i; for(i=0;i<length;i++) if(strcmp(data[i].name,n)==0) //对象引用 cout<<data[i]; } void People::Findyear(int y) { int i; for(i=0;i<length;i++) if(data[i].year==y) cout<<data[i]; } void People::Del(int i) { int j; if(i<1""i>length) cout<<"不存在第"<<i<<"个元素"; for(j=i;j<length;j++) data[j-1]=data[j]; length--; } void worker::AddF() { int flag=0; iofile.open("worker_information.txt",ios::in"ios::binary); //文件的打开与关闭 while(iofile.seekg(ios::cur)) { iofile.seekg(leng
教职工档案管理系统 " 一、本 组 设 计 的 功 能 描 述 " " " "系统功能概述 " "根据教职工档案管理系统的需求,主要有如下功能: " "·教职工信息查询功能:方便查询相关信息 " "·教职工信息修改功能:管理人员可修改教职工个人信息 " "·教职工信息插入功能:管理人员可插入教职工所有信息 " "·教职工信息删除功能:管理人员可删除教职工所有信息 " "二、本 组 设 计 的 主 要 特 色 " " " " " "此次课程设计主要运用自己所学的数据库相关知识,遵循数据库设计的需求 " "分析、概念结构设计、数据库逻辑设计、数据库物理设计、数据库的实施以 " "及数据库的运行和维护等六个步骤,结合数据流图,E-R图等来完成此教职工" "管理课程设计的有关查询、修改、插入、删除功能等的操作,当进行某一项 " "操作时,并不会影响其他的内容,整体下来,此设计从布局到构思,从设计 " "到运行,从操作到报告都真实的反映了数据库设计的要求。 " "三、系 统 分 析 与 设 计 " "1 需求分析 " "1.1用户需求 " "教职工档案管理系统是一个教育单位不可缺少的部分,它的内容对于学校的决策 " "者和管理者来说都至关重要,所以教职工档案管理系统应该能够为用户提供充足 " "的信息和快捷的查询手段 " "1.2系统功能概述 " "根据教职工档案管理系统的需求,主要有如下功能: " "·管理人员登录功能:管理人员登录后才可进入选择功能的界面 " "·密码修改功能:管理人员可修改自己的密码 " "·信息管理功能:管理人员可浏览、修改教职工所有信息 " "·信息查询功能:方便查询想找的信息 " "2数据库设计 " "2.1数据库的概念结构设计 " " " " " " " "2.1.1系统流程图 " " " " " " " " " " " "2.1.2功能流程图 " " " "2.2数据库的逻辑结构设计 " "将实体转化为关系模式 " "教职工关系模式(职工号,姓名,性别,民族,出生日期,婚姻状况,籍贯,毕" "业学校,最高学历,政治面貌,联系方式,照片) " "简历关系模式(职工号,姓名,起始年月,工作单位,职务) " "奖惩关系模式(职工号,姓名,时间,地点,奖励、惩罚) " " " " " "1.3数据库的物理结构设计 " "1.基本信息表 " "字段名 " "类型 " "宽度 " "Null " " " "zgh " "字符型 " "10 " " " " " "xm " "字符型 " "10 " " " " " "xb " "字符型 " "10 " " " " " "mz " "字符型 " "10 " " " " " "csrq " "日期型 " "8 " " " " " "hyzk " "字符型 " "10 " " " " " "jg " "字符型 " "10 " " " " " "byxx " "字符型 " "18 " " " " " "zgxl " "字符型 " "10 " " " " " "zzmm " "字符型 " "10 " " " " " "lxfs " "字符型 " "12 " " " " " "zp " "通用性 " "4 " " " " " "2.简历信息表 " "字段名 " "类型 " "宽度 " "Null " " " "zgh " "字符型 " "10 " " " " " "xm " "字符型 " "10 " " " " " "gzdw " "字符型 " "50 " " " " " "zw " "字符型 " "10 " " " " " "qsny " "日期型 " "8 " " " " " "3.奖惩信息表 " "字段名 " "类型 " "宽度 " "Null " " " "zgh " "字符型 " "10 " " " " " "xm " "字符型 " "10 " " " " " "sj " "日期型 " "8 " " " " " "dd " "字符型 " "50 " " " " " "jl " "字符型 " "50 " " " " " "cf " "字符型 " "50 " " " " " " " "1.4模块设计 " " " " " " " "3..1教职工档案管理系统模块设计 " " " "3编程实现 " "3.1创建数据库——教职工管理系统 " " " "Create database 教职工管理系统 " "on " "(name='教职工管理系统', " "filename='F:\my_data\教职工管理系统.mdf', " "size=10mb, " "filegrowth=5% " ") " "log on " "( " "name='教职工管理系统_log', " "fil
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值