队列课程设计做的银行取钱的模拟过程。
C++,VS2022
程序框架讲解
三个类
person有基本的个人信息,但是最重要的是cometime leavetime dealwithtime属性。
class node
{
public:
node() {};
~node() {};
int comeminute;
int leaveminute;
};
bankqueue队列
come函数 leave函数 queue数组属性 windows窗口函数。
class bankservice
{
friend class node;
private:
int count;
int randdealminute;
int windows[4];
int flagg;
int person;
int R;
int rear[4], front[4];
int queuelength, queuelength1;
string s[4] = { "正在喝水","正在和别人交流","打电话中","正在整理资料" };
int ammount;
node queueperson[4][25];
int usenumber;
public:
bankservice();
~bankservice()
{
cout << "析构函数被调用!" << endl;
}
void windowopen();
void wholeprocess();
void CustomerArrived();
int minwindow();
void CustomerDepartion();
};
wholeprocess类
因为是动态模拟过程,所以采用的是面向过程,步骤法编写程序。
后端是用文件保存数据。
如果需要学习的话可以免费下载。数据结构队列银行取钱模拟过程-C++文档类资源-CSDN下载



