C++文件交互实践:职工管理系统

news2024/10/7 4:36:15

管理系统需求

实现一个基于多态的职工管理系统

创建管理类

管理类负责内容:

  • 与用户的沟通菜单界面
  • 对职工增删改查的操作
  • 与文件的读写交互

文件交互 -- 写文件

void workerManger::save()
{
	ofstream ofs;
	ofs.open(FILENAME, ios::out);
	for (int i = 0; i < this->m_EmpNum; ++i)
	{
		ofs << this->m_EmpArray[i]->m_Id << " "
			<< this->m_EmpArray[i]->m_Name << " "
			<< this->m_EmpArray[i]->getDepNumber() << endl;
	}
	ofs.close();
}

文件交互 -- 读文件

  1. 第一次使用,文件未创建
  2. 文件存在,但是数据被用户清空
  3. 文件存在,并且保存职工的所有数据

在构造函数中初始化数据

workerManger::workerManger()
{
	ifstream ifs;
	ifs.open(FILENAME, ios::in);
	//1.文件不存在情况
	if (!ifs.is_open())
	{
		cout << "文件不存在" << endl;//测试输出
		//初始化人数
		this->m_EmpNum = 0;
		//初始化数组指针
		this->m_EmpArray = NULL;
		//初始化文件为空标志
		this->m_FileIsEmpty = true;
		ifs.close();//关闭文件对象
		return;
	}
	//2.文件存在但为空判断
	char ch;
	ifs >> ch;
	//如果ch为尾,那么读完后ifs.eof函数为空
	if (ifs.eof())
	{
		cout << "文件为空" << endl;//测试输出
		//初始化人数
		this->m_EmpNum = 0;
		//初始化数组指针
		this->m_EmpArray = NULL;
		//初始化文件为空标志
		this->m_FileIsEmpty = true;
		ifs.close();//关闭文件对象
		return;
	}
	//3.文件存在,并记录数据
    this->get_EmpNum();
}
//统计文件中人数
int workerManger::get_EmpNum()
{
	ifstream ifs;
	ifs.open(FILENAME, ios::in);
	int id;
	string name;
	int dId;
	int num = 0; 
	while (ifs >> id && ifs >> name && ifs >> dId)
	{
		//统计人数数量
		num++;
	}
    return num;
}

实现代码

职工管理系统.cpp

#include "workerManger.h"
#include"employee.h"
#include"manager.h"
#include"boss.h"
int main()
{
	workerManger wm;
	

	while (true)
	{
		wm.showMenu();
		cout << "请输入您的选择:" << endl;
		int	 num;
		cin >> num;
		switch (num)
		{
		case 0:
			wm.exitFunction();
			break;
		case 1:
			wm.AddEmp();
			break;
		case 2:
			wm.show_Emp();
			break;
		case 3:
			wm.del_Emp();
			break;
		case 4:
			wm.mod_Emp();
			break;
		case 5:
			wm.find_Emp();
			break;
		case 6:
			wm.sort_Emp();
			break;
		case 7:
			wm.clear_Emp();
			break;
		default:
			system("cls"); //清屏
			break;
		}
	}

	//Worker* worker = NULL;
	//worker = new employee(1, "张三", 1);
	//worker->showInfo();
	//delete worker;
	//worker = new manager(2, "李四", 2);
	//worker->showInfo();
	//delete worker;
	//worker = new boss(3, "王五", 23);
	//worker->showInfo();
	//delete worker;

}

workerManager.h

#pragma once
#include<iostream>
#include"employee.h"
#include"manager.h"
#include"boss.h"
#include<fstream>
#define FILENAME "empFile.txt"
using namespace std;
//管理类
class workerManger
{
public:
	workerManger();
	~workerManger();
	//菜单界面
	void showMenu();
	
	//退出功能
	void exitFunction();
	//添加职工功能
	void AddEmp();
	//写入文件功能
	void save();
	//统计文件中人数
	int get_EmpNum();
	//初始化员工
	void init_Emp();
	//显示员工
	void show_Emp();
	//删除员工
	//判断员工是否存在,如果存在返回职工所在数组中的位置,
	//不存在则返回-1
	int IsExit(int id);
	void del_Emp();
	//修改员工
	void mod_Emp();
	//查找员工
	void find_Emp();
	//员工排序
	void sort_Emp();
	//清空数据
	void clear_Emp();
	//记录文件中的人数个数
	int m_EmpNum;
	//员工数组的指针
	Worker** m_EmpArray;
	//标志文件是否为空
	bool m_FileIsEmpty;
	

};

workerManager.cpp

#include "workerManger.h"

void workerManger:: showMenu()
{
	cout << "***********************************" << endl;
	cout << "******** 欢迎使用职工管理系统!***********" << endl;
	cout << "******** 0. 退出管理程序  ***************" << endl;
	cout << "******** 1. 增加职工信息  ***************" << endl;
	cout << "******** 2. 显示职工信息****************" << endl;
	cout << "******** 3. 删除离职员工****************" << endl;
	cout << "******** 4. 修改员工信息****************" << endl;
	cout << "******** 5. 查找员工信息****************" << endl;
	cout << "******** 6. 按照编号排序****************" << endl;
	cout << "******** 7. 清空所有文档****************" << endl;
	cout << "***********************************" << endl;
}

void workerManger::exitFunction()
{
	system("pause");
	exit(0);
}
int workerManger::get_EmpNum()
{
	ifstream ifs;
	ifs.open(FILENAME, ios::in);
	int id;
	string name;
	int dId;
	int num = 0; 
	while (ifs >> id && ifs >> name && ifs >> dId)
	{
		//统计人数数量
		num++;
	}
	//关闭文件
	ifs.close();
	return num;
}
void workerManger::init_Emp()
{
	ifstream ifs;
	ifs.open(FILENAME, ios::in);
	int id;
	string name;
	int dId;
	int index = 0;
	while (ifs >> id && ifs >> name && ifs >> dId)
	{
		Worker* worker = NULL;
		//根据不同部门Id创建不同对象
		if (dId == 1)
		{
			worker = new employee(id, name, dId);
		}
		else if (dId == 2)
		{
			worker = new manager(id, name, dId);
		}
		else
		{
			worker = new boss(id, name, dId);
		}
		//存放在数据中
		this->m_EmpArray[index] = worker;
		index++;
	}
	//关闭文件
	ifs.close();

}
workerManger::workerManger()
{
	ifstream ifs;
	ifs.open(FILENAME, ios::in);
	//1.文件不存在情况
	if (!ifs.is_open())
	{
		//cout << "文件不存在" << endl;//测试输出
		//初始化人数
		this->m_EmpNum = 0;
		//初始化数组指针
		this->m_EmpArray = NULL;
		//初始化文件为空标志
		this->m_FileIsEmpty = true;
		ifs.close();//关闭文件对象
		return;
	}
	//2.文件存在但为空判断
	char ch;
	ifs >> ch;
	//如果ch为尾,那么读完后ifs.eof函数为空
	if (ifs.eof())
	{
		//cout << "文件为空" << endl;//测试输出
		//初始化人数
		this->m_EmpNum = 0;
		//初始化数组指针
		this->m_EmpArray = NULL;
		//初始化文件为空标志
		this->m_FileIsEmpty = true;
		ifs.close();//关闭文件对象
		return;
	}
	//3.文件存在,并记录数据
	int num = this->get_EmpNum();
	//cout << "职工人数为:" << num << endl;
	this->m_EmpNum = num;
	//开辟空间
	this->m_EmpArray = new Worker * [this->m_EmpNum];
	//将文件中的数据,存到数组中
	this->init_Emp();

}
void workerManger::save()
{
	ofstream ofs;
	ofs.open(FILENAME, ios::out);
	for (int i = 0; i < this->m_EmpNum; ++i)
	{
		ofs << this->m_EmpArray[i]->m_Id << " "
			<< this->m_EmpArray[i]->m_Name << " "
			<< this->m_EmpArray[i]->m_dId << endl;
	}
	ofs.close();
}
void workerManger:: AddEmp()
{
	cout << "请输入增加员工数量:" << endl;
	int addNum = 0;
	cin >> addNum;
	if (addNum > 0)
	{
		//计算新空间大小
		int newSize = this->m_EmpNum + addNum;
		//开辟新空间
		Worker** newSpace = new Worker * [newSize];
		int num = 0;
		if (this->m_EmpArray != NULL)
		{
			for (int i = 0; i < this->m_EmpNum; ++i)
			{
				newSpace[i] = this->m_EmpArray[i];
				num++;
			}
		}
		for (int i = 0; i < addNum; ++i)
		{
			int id;//职工编号
			string name;//职工名字
			int dId; //部门选择
			int preNum = this->m_EmpNum+i;
			cout << "请输入第" << i + 1 << "个职工的编号:" << endl;
			cin >> id;
			cout << "请输入第" << i + 1 << "个职工的名字:" << endl;
			cin >> name;
			cout << "请输入第" << i + 1 << "个职工的职位:" << endl;
			cout << "1.普通职工" << endl;
			cout << "2.经理" << endl;
			cout << "3.老板" << endl;

			cin >> dId;
			Worker* worker = NULL;
			switch (dId)
			{
			case 1:
				worker = new employee(id, name, dId);
				break;
			case 2:
				worker = new manager(id, name, dId);
				break;
			case 3:
				worker = new boss(id, name, dId);
				break;
			default:
				break;
			}
			//将创建职工职责,添加到数组中
			newSpace[this->m_EmpNum + i] = worker;
		}
		//释放原有空间
		delete[] this->m_EmpArray;
		//更改新空间的指向
		this->m_EmpArray = newSpace;
		//更新新的职工人数
		this->m_EmpNum = newSize;
		//更新职工不为空标志
		this->m_FileIsEmpty = false;
		//保存职工内容
		this->save();
		//提示添加成功
		cout << "成功添加" << addNum << "名新职工" << endl;
		//按任意键后,清屏回到上级目录	
		system("pause");
		system("cls");
	}
	else
	{
		cout << "输入有误" << endl;
	}

}
//显示员工
void workerManger::show_Emp()
{
	
	if (this->m_FileIsEmpty)
	{
		cout << "文件不存在或记录为空!" << endl;
	}
	else
	{
		for (int i = 0; i < m_EmpNum; ++i)
		{
			//利用多态调用接口
			this->m_EmpArray[i]->showInfo();
		}
	}
	system("pause");
	system("cls");
}

//删除员工
void workerManger::del_Emp()
{
	if (this->m_FileIsEmpty)
	{
		cout << "文件不存在或记录为空!" << endl;
	}
	else
	{
		//按照职工编号删除
		cout << "请输入想要删除的职工编号:" << endl;
		int id = 0;
		cin >> id;
		int index = this->IsExit(id);
		if (index != -1)//找到员工
		{
			for (int i = index; i < this->m_EmpNum-1; ++i)
			{
				this->m_EmpArray[i] = this->m_EmpArray[i + 1];
			}
			//更新数组中记录人员数
			this->m_EmpNum--;
			//更新文件
			this->save();
			cout << "删除成功!" << endl;
		}
		else
		{
			cout << "删除失败,没有该员工!" << endl;
		}
	}
	system("pause");
	system("cls");
}
int workerManger::IsExit(int id)
{
	int index = -1;
	for (int i = 0; i < this->m_EmpNum; ++i)
	{
		if (this->m_EmpArray[i]->m_Id == id)
		{
			index = i;
			break;
		}
	}
	return index;
}
//修改员工
void workerManger::mod_Emp()
{
	if (this->m_FileIsEmpty)
	{
		cout << "文件不存在或记录为空!" << endl;
	}
	else
	{
		cout << "请输入要修改职工的编号:" << endl;
		int id;
		cin >> id;
		int index = this->IsExit(id);
		if (index != -1)
		{
			delete this->m_EmpArray[index];
			int new_id;
			string new_name;
			int new_dId;
			cout << "查到:"<<id<<"号员工,请输入新职工号:" << endl;
			cin >> new_id;
			cout << "请输入修改后职工的姓名:" << endl;
			cin >> new_name;
			cout << "请输入修改后职工的编号:" << endl;
			cout << "1.普通职工" << endl;
			cout << "2.经理" << endl;
			cout << "3.老板" << endl;
			cin >> new_dId;
			Worker* worker = NULL;
			switch (new_dId)
			{
			case 1:
				worker = new employee(new_id, new_name, new_dId);
				break;
			case 2:
				worker = new manager(new_id, new_name, new_dId);
				break;
			case 3:
				worker = new boss(new_id, new_name, new_dId);
				break;
			default:
				break;
			}
			m_EmpArray[index] = worker;
			this->save();
			cout << "修改成功!" << endl;
		}
		else
		{
			cout << "没有找到该员工!" << endl;
		}
	}
	system("pause");
	system("cls");
}
//查找员工
void workerManger::find_Emp()
{
	if (this->m_FileIsEmpty)
	{
		cout << "文件不存在或记录为空!" << endl;
	}
	else
	{
		cout << "请输入查找方式:" << endl;
		cout << "1. 按职工编号查找:" << endl;
		cout << "2. 按职工姓名查找:" << endl;
		int select = 0;
		cin >> select;
		if (select == 1)
		{
			cout << "请输入查找的职工编号:" << endl;
			int id;
			cin >> id;
			int f = this->IsExit(id);
			if (f != -1)
			{
				cout << "查找成功,编号为" << id << "的信息如下:" << endl;
				this->m_EmpArray[f]->showInfo();
			}
			else
			{
				cout << "没有该员工!" << endl;
			}
		}
		else if (select == 2)
		{
			cout << "请输入查找的职工姓名:" << endl;
			string name;
			cin >> name;
			bool flag = true;
			for (int i = 0; i < this->m_EmpNum; ++i)
			{
				if (this->m_EmpArray[i]->m_Name == name)
				{
					cout << "查找成功,姓名为" << name << "的信息如下:" << endl;
					this->m_EmpArray[i]->showInfo();
					flag = false;
				}
			}
			if (flag)
			{
				cout << "查无此人!" << endl;
			}
		}
		else
		{
			cout << "输入错误!" << endl;
		}
	}
	system("pause");
	system("cls");
}
//员工排序
void workerManger::sort_Emp()
{
	if (this->m_FileIsEmpty)
	{
		cout << "文件不存在或记录为空!" << endl;
		system("pause");
		system("cls");
	}
	else
	{
		cout << "请输入:1.升序排序" << endl;
		cout << "2.将序排序" << endl;
		int select;
		cin >> select;
		for (int i = 0; i < this->m_EmpNum; ++i)
		{
			int minOrmax = i; //声明最小值或最大值下标
			for (int j = i + 1; j < this->m_EmpNum; ++j)
			{
				if (select == 1)
				{
					if (this->m_EmpArray[j]->m_Id < this->m_EmpArray[minOrmax]->m_Id)
					{
						minOrmax = j;
					}
				}
				else
				{
					if (this->m_EmpArray[j]->m_Id > this->m_EmpArray[minOrmax]->m_Id)
					{
						minOrmax = j;
					}
				}
			}
			if (minOrmax != i)
			{
				Worker* temp = this->m_EmpArray[i];
				this->m_EmpArray[i] = this->m_EmpArray[minOrmax];
				this->m_EmpArray[minOrmax] = temp;
			
			}

		}
		cout << "排序成功!" << endl;
		this->save();
		this->show_Emp();
	}
}
//清空数据
void workerManger::clear_Emp()
{
	cout << "确定清空数据?" << endl;
	cout << "1. 确定" << endl;
	cout << "2. 退出" << endl;
	int select;
	cin >> select;
	if (select == 1)
	{
		ofstream ofs(FILENAME, ios::trunc);//删除文件后文件重新创建
		ofs.close();
		if (this->m_EmpArray != NULL)
		{
			//删除堆区的每个职工对象
			for (int i = 0; i < this->m_EmpNum; ++i)
			{
				delete this->m_EmpArray[i];
				this->m_EmpArray[i] = NULL;
			}
			//删除堆区数组指针
			delete[] this->m_EmpArray;
			this->m_EmpArray = NULL;
			this->m_FileIsEmpty = true;
		}
		cout << "清空成功!" << endl;
	}
	system("pause");
	system("cls");
}
workerManger:: ~workerManger()
{
	if (this->m_EmpArray != NULL)
	{
		delete[] this->m_EmpArray;
		this->m_EmpArray = NULL;
	}
}

worker.h

#pragma once
#include<iostream>
using namespace std;
class Worker
{
public:
	virtual void showInfo()=0;
	virtual string getDepNumber() = 0;
	int m_Id;
	string m_Name;
	int m_dId;

};

empolyee.h

#pragma once
#include"worker.h"
class employee: public Worker
{
public:
	employee(int id, string name, int dId);
	void showInfo();
	string getDepNumber();
};

empolyee.cpp

#include "employee.h"
employee::employee(int id, string name, int dId)
{
	this->m_Id = id;
	this->m_Name = name;
	this->m_dId = dId;
}
void employee::showInfo()
{
	cout << "职工编号:" << this->m_Id
		<< "\t职工姓名:" << this->m_Name
		<< "\t岗位:" << this->getDepNumber()
		<< "\t岗位职责:完成经理交给的任务" << endl;
}
string employee::getDepNumber()
{
	return string("员工");
}

manager.h

#pragma once
#include"worker.h"
class manager : public Worker
{
public:
	manager(int id, string name, int dId);
	void showInfo();
	string getDepNumber();
};

manager.cpp

#include "manager.h"
manager::manager(int id, string name, int dId)
{
	this->m_Id = id;
	this->m_Name = name;
	this->m_dId = dId;
}
void manager::showInfo()
{
	cout << "职工编号:" << this->m_Id
		<< "\t职工姓名:" << this->m_Name
		<< "\t岗位:" << this->getDepNumber()
		<< "\t岗位职责:完成老板交给的任务,并下发任务给员工" << endl;
}
string manager::getDepNumber()
{
	return string("经理");
}

boss.h

#pragma once
#include"worker.h"
class boss : public Worker
{
public:
	boss(int id, string name, int dId);
	void showInfo();
	string getDepNumber();
};

boss.cpp

#include "boss.h"
boss::boss(int id, string name, int dId)
{
	this->m_Id = id;
	this->m_Name = name;
	this->m_dId = dId;
}
void boss::showInfo()
{
	cout << "职工编号:" << this->m_Id
		<< "\t职工姓名:" << this->m_Name
		<< "\t岗位:" << this->getDepNumber()
		<< "\t岗位职责:管理公司所有事务" << endl;
}
string boss::getDepNumber()
{
	return string("老板");
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1039860.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

TP-LINK设备在防视频监控EasyCVR平台上无法使用语音对讲功能该如何解决?

安防视频监控/视频集中存储/云存储/磁盘阵列EasyCVR平台可拓展性强、视频能力灵活、部署轻快&#xff0c;可支持的主流标准协议有国标GB28181、RTSP/Onvif、RTMP等&#xff0c;以及支持厂家私有协议与SDK接入&#xff0c;包括海康Ehome、海大宇等设备的SDK等。平台既具备传统安…

前后台分离开发 YAPI平台 前端工程化之Vue-cli

目录 YAPI介绍前端工程化之Vue-cli前端工程化简介前端工程化入门——Vue-cli环境准备Vue项目简介创建Vue项目vue项目目录结构介绍vue项目运行方法 Vue项目开发流程 前后台混合开发这种开发模式有如下缺点&#xff1a; 沟通成本高&#xff1a;后台人员发现前端有问题&#xff0…

xss靶场练习level 1-10

level 1 1.搭建靶场后打开第一题 2.点击图片&#xff0c;页面跳转后提示“payload长度为&#xff1a;4”&#xff0c;观察url 存在传参 &#xff1f;nametest &#xff0c;且字符长度为4 3.查看网页源码&#xff0c;发现第一个点击图片跳转页面存在用户名提交&#xf…

wps及word通配匹配与正则匹配之异同

前言 今天在chatgpt上找找有什么比赛可以参加。下面是它给我的部分答案&#xff0c;我想将其制成文档裱起来&#xff0c;并突出比赛名方便日后查找。 这时理所当然地想到了查找替换功能&#xff0c;但是当我启用时却发现正则匹配居然没有了&#xff0c;现在只有通配匹配了。 …

c语言常见字符函数、内存函数(详讲)

前言&#xff1a; 其实在c语言当中是没有字符串这一概念的&#xff0c;不像c里面有string类型用来存放字符串。在c语言中我们只能把字符串放在字符串常量以及字符数组中。 1.常见字符串函数 1.1strlen size_t strlen ( const char * str );作用&#xff1a;用来求字符串中 …

MySQL之表的增删查改(1)

目录 一、插入数据 1、单行数据 全列插入 2、多行数据 指定列插入 3、插入否则更新 4、替换 二、读取 1、select列 2、where条件 3、结果排序 4、筛选分页结果 一、插入数据 首先创建一张表 mysql> CREATE TABLE students(-> id int unsigned primary key auto_incre…

背靠背 HVDC-MMC模块化多电平转换器输电系统-用于无源网络系统的电能质量调节MATLAB仿真模型

微❤关注“电气仔推送”获得资料&#xff08;专享优惠&#xff09; MATLAB2021版本 模型简介&#xff1a; MMC-HVDC模拟背靠背HVDC模块化多电平换流器&#xff08;MMC&#xff09;作为为整个电网供电的电能质量调节系统。因此&#xff0c;模块化多电平逆变器作为远程端转换器…

PyTorch 深度学习之用PyTorch实现线性回归Linear Regression with PyTorch(四)

0. Revision 1. PyTorch Fashion 2 Prepare dataset 广播机制 loss 3 Design model 文档 callable 4 Construct Loss and Optimizer 5 Training Cycle 总结 Test model

知识图谱:知识融合

知识融合简介 知识融合&#xff0c;即合并两个知识图谱(本体)&#xff0c;基本的问题都是研究怎样将来自多个来源的关于同一个实体或概念的描述信息融合起来。需要确认的是&#xff1a;等价实例、等价类/子类、等价属性/子属性。 一个例子如上图所示&#xff0c;图中不同颜色的…

【unity2023打包安卓工程】踩坑记录

这里写自定义目录标题 踩坑记录使用环境Unity的准备工作Windows10 SDKAndroidstudio第一个需要注意的地方第二个需要注意的地方第三个需要注意的地方第四个需要注意的地方第五个需要注意的地方 踩坑记录 踩了快一个星期的坑&#xff0c;希望能帮助到有需要的人 项目使用的是uni…

WorkPlus私有化部署IM即时通讯平台,构建高效安全的局域网办公环境

随着数字化转型的加速&#xff0c;政府机构与企业对高效、安全的即时通讯和协作工具的需求日益增长。企业微信和钉钉作为当前市场上较为常见的通讯工具&#xff0c;虽然在一定程度上满足了企业内部协作的需求&#xff0c;但仍存在一些问题&#xff0c;如数据安全性、私有化部署…

OpenCV实现图像的礼帽和黑帽

礼帽运算 黑帽运算 参数 cv.morphologyEx(img,op,kernel)参数&#xff1a; img : 要处理的图像op: 处理方式 代码实现 import numpy as np import cv2 as cv import matplotlib.pyplot as plt from pylab import mplmpl.rcParams[font.sans-serif] [SimHei]#读取图像img1 …

【Linux】系统编程基于阻塞队列生产者消费者模型(C++)

目录 【1】生产消费模型 【1.1】为何要使用生产者消费者模型 【1.2】生产者消费者模型优点 【2】基于阻塞队列的生产消费者模型 【2.1】生产消费模型打印模型 【2.2】生产消费模型计算公式模型 【2.3】生产消费模型计算公式加保存任务模型 【2.3】生产消费模型多生产多…

指针笔试题讲解

文章目录 题目答案与解析1、234、5、6、7、8、 题目 int main() {int a[5] { 1, 2, 3, 4, 5 };int *ptr (int *)(&a 1);printf( "%d,%d", *(a 1), *(ptr - 1));return 0; }//由于还没学习结构体&#xff0c;这里告知结构体的大小是20个字节 //由于还没学习结…

解答嵌入式和单片机的关系

嵌入式系统是一种特殊的计算机系统&#xff0c;用于特定任务或功能。而单片机则是嵌入式系统的核心部件之一&#xff0c;是一种在单个芯片上集成了处理器、内存、输入输出接口等功能的微控制器。刚刚好我这里有一套单片机保姆式教学&#xff0c;里面有编程教学、问题讲解、语言…

试图一文彻底讲清 “精准测试”

在软件测试中&#xff0c;我们常常碰到两个基本问题&#xff08;困难&#xff09;&#xff1a; 很难保障无漏测&#xff1a;我们做了大量测试&#xff0c;但不清楚测得怎样&#xff0c;对软件上线后会不会出问题&#xff0c;没有信心&#xff1b; 选择待执行的测试用例&#…

百胜中国,全面进击

“未来三年&#xff0c;每年净增约1800家新店。” 美股研究社关注到&#xff0c;2023年投资者日活动上&#xff0c;百胜中国根据2024至2026年的发展规划&#xff0c;启动了集团RGM2.0战略。 三年时间&#xff0c;门店数要达到20000家&#xff0c;平均每年新增门店约1800家&am…

【【萌新的SOC大学习之hello_world】】

萌新的SOC大学习之hello_world zynq本次hello world 实验需要 PS-PL Configuration 页面能够配置 PS-PL 接口&#xff0c;包括 AXI、HP 和 ACP 总线接口。 Peripheral IO Pins 页面可以为不同的 I/O 外设选择 MIO/EMIO 配置。 MIO Configuration 页面可以为不同的 I/O 外设具…

蓝牙核心规范(V5.4)11.2-LE Audio 笔记之LE Auido架构

专栏汇总网址&#xff1a;蓝牙篇之蓝牙核心规范学习笔记&#xff08;V5.4&#xff09;汇总_蓝牙核心规范中文版_心跳包的博客-CSDN博客 爬虫网站无德&#xff0c;任何非CSDN看到的这篇文章都是盗版网站&#xff0c;你也看不全。认准原始网址。&#xff01;&#xff01;&#x…

event.stopPropagation()

现在有如下 当点击子按钮的时候会触发子事件&#xff0c;同时也会触发父事件&#xff0c; 如何阻止呢 handleDownload(event) { event.stopPropagation(); 。。。。。。。。。。 },