本专栏记录C++学习过程包括C++基础以及数据结构和算法,其中第一部分计划时间一个月
(2024.1.4-2024.1.27已完结)
,主要跟着黑马视频教程,学习路线如下,不定时更新,欢迎关注。
当前章节处于:
---------第1阶段-C++基础入门
---------第2阶段实战-通讯录管理系统,
---------第3阶段-C++核心编程,
---------第4阶段实战-基于多态的企业职工系统
---------第5阶段-C++提高编程
---------第6阶段实战-基于STL泛化编程的演讲比赛
=====>第7阶段-C++实战项目机房预约管理系统
学校现有几个规格不同的机房,由于使用时经常出现“撞车现象”,现开发一套机房预约系统,解决这一问题。分别有三个身份使用该程序分别有三种身份使用该程序
机房总共有3间
申请简介:
系统具体需求
首先有三个角色,分析发现他们的属性和方法大致相同,因此需要用到继承和多态,创建一个父类再通过继承的方式创建子类。在子类中添加子类特有的属性和方法。每一个角色相当于创建一个子系统,教师和学生高度相似,管理员系统的主要目的就是创建教师和学生。每个子系统通过txt构成联系,用户输入信息进行登录,因此需要提前将信息存储在txt文件中,对txt文件中的信息进行检查判断,如果判断到了就登录,文件读完还没判断到就说明没有此人对应信息,提示用户名或密码错误。对于有差异的提示信息,可以通过判断,给变量赋值不同的内容,再调用这个变量。每生成一条预约,就需要将这条预约存到txt文件中,查看所有预约遍历整个txt文件即可。查看自己预约,则需要判断预约中的学号等不等于当前用户的学号(姓名不一定唯一,但是学号一定唯一)。教师端审核预约即将预约的状态码改变即可,改变之后,需要重新更新txt文件,整个预约是一个嵌套的map,第一层key存预约编号,第二层存预约的具体信息。管理员在添加账号之前也需要判断编号和职工号是否重复,因此需要读入学生或者员工的信息,遍历判断。查看账号,遍历对应的文件即可。查看机房信息则遍历机房对应的txt文件即可,清空预约,清空预约对应的txt文件即可。为显示出子菜单的效果,在用户登录成功后在顶端输出用户名,表示进入子菜单。
globalFile.h
#pragma once
//管理员文件
#define ADMIN_FILE "admin.txt"
//学生文件
#define STUDENT_FILE "student.txt"
//教师文件
#define TEACHER_FILE "teacher.txt"
//机房信息文件
#define COMPUTER_FILE "computerRoom.txt"
//订单文件
#define ORDER_FILE "order.txt"
Identity.h
#pragma once
#include
using namespace std;
class Identity {
public:
virtual void showSecondMenu()=0;
string m_name;
string m_password;
};
manager.h
#pragma once
#include
using namespace std;
#include "Identity.h"
class Manager :public Identity {
public:
// 默认构造
Manager();
// 有参构造
Manager(string name, string pw);
// 添加账号
void addPerson();
// 查看账号
void showPerson();
// 查看机房信息
void showComputer();
// 清空预约记录
void clearFile();
// 显示管理员子菜单
virtual void showSecondMenu();
};
student.h
#pragma once
#include
using namespace std;
#include "Identity.h"
#include
#include"globalFile.h"
#include
#include
#include
#include
class Student :public Identity {
public:
// 默认构造
Student();
// 有参构造
Student(int id, string name, string pw);
// 申请预约
void applyOrder();
// 显示预约
void showMyOrder();
// 查看所有预约
void showAllOrder();
// 取消预约
void cancelOrder();
// 显示学生子菜单
virtual void showSecondMenu();
int m_id;
};
teacher.h
#pragma once
#include
using namespace std;
#include "Identity.h"
#include
#include
#include"globalFile.h"
#include
#include
class Teacher :public Identity {
public:
// 默认构造
Teacher();
// 有参构造
Teacher(int id, string name, string pw);
// 查看所有预约
void showAllOrder();
// 审核预约
void vaildOrder();
// 显示老师子菜单
virtual void showSecondMenu();
int m_Tid;
};
// 默认构造
Teacher::Teacher() {
}
// 有参构造
Teacher::Teacher(int id, string name, string pw) {
m_Tid = id;
m_name = name;
m_password = pw;
}
// 查看所有预约
void Teacher::showAllOrder() {
ifstream ifs;
ifs.open(ORDER_FILE, ios::in);
string date ;
string interval;
string id ;
string name;
string room;
string status;
while (ifs >> date && ifs >> interval && ifs >> id && ifs >> name && ifs >> room && ifs >> status) {
cout << date << interval << id << name << room << status << endl;
}
ifs.close();
}
map<int, map<string, string>> txtTomap1() {
ifstream ifs;
ifs.open(ORDER_FILE, ios::in);
map<int, map<string, string>> Bigmap;
string date;
string interval;
string id;
string name;
string room;
string status;
int count = 0; // 序号
string line;
while (getline(ifs, line)) {
istringstream iss(line);
string date, interval, id, name, room, status;
if (iss >> date >> interval >> id >> name >> room >> status) {
map<string, string> mp;
mp.insert(make_pair("date", date));
mp.insert(make_pair("interval", interval));
mp.insert(make_pair("id", id));
mp.insert(make_pair("name", name));
mp.insert(make_pair("room", room));
mp.insert(make_pair("status", status));
Bigmap.insert(make_pair(count, mp));
count++;
}
}
ifs.close();
return Bigmap;
}
void mapToTxt1(map<int, map<string, string>> &Bigmap) {
ofstream ofs;
ofs.open(ORDER_FILE, ios::trunc);
for (map<int, map<string, string>>::iterator it = Bigmap.begin(); it != Bigmap.end(); it++) {
string date = (*it).second["date"];
string interval = (*it).second["interval"];
string id = (*it).second["id"];
string name = (*it).second["name"];
string room = (*it).second["room"];
string status = (*it).second["status"];
ofs <<date << " ";
ofs << interval << " ";
ofs << id << " ";
ofs << name << " ";
ofs << room << " ";
ofs << status << endl;
}
ofs.close();
}
// 审核预约
void Teacher::vaildOrder() {
map<int, map<string, string>> Bigmap = txtTomap1();
ifstream ifs;
ifs.open(ORDER_FILE, ios::in);
string date;
string interval ;
string id;
string name;
string room;
string status;
int count = 1; // 计数器
int target;
showAllOrder();
cout << "请输入你要审核第几条记录:" << endl;
cin >> target;
while (true) {
if (count == target) {
Bigmap[count-1]["status"] = "status:2";
break;
}
count++;
}
mapToTxt1(Bigmap);
ifs.close();
}
// 显示老师子菜单
void Teacher::showSecondMenu()
{
cout << "欢迎教师:" << this->m_name << "登录!" << endl;
cout << "\t\t ----------------------------------\n";
cout << "\t\t| |\n";
cout << "\t\t| 1.查看所有预约 |\n";
cout << "\t\t| |\n";
cout << "\t\t| 2.审核预约 |\n";
cout << "\t\t| |\n";
cout << "\t\t| 0.注销登录 |\n";
cout << "\t\t| |\n";
cout << "\t\t ----------------------------------\n";
cout << "请选择您的操作: " << endl;
}
Manager.cpp
#include
using namespace std;
#include "Identity.h"
#include"manager.h"
#include
#include"globalFile.h"
// 默认构造
Manager::Manager() {
}
// 有参构造
Manager::Manager(string name, string pw) {
m_name = name;
m_password = pw;
}
// 判断
bool checkRepeat(string fileName, int id) {
ifstream ifs;
ifs.open(fileName, ios::in);
int Fid;
string Fname;
string Fpwd;
while (ifs >> Fid && ifs >> Fname && ifs >> Fpwd) {
if (Fid == id ) {
return true;
}
}
return false; // 没有重复的
}
// 添加账号
void Manager::addPerson() {
cout << "请输入添加账号的类型" << endl;
cout << "1、添加学生" << endl;
cout << "2、添加老师" << endl;
int choice = 0;
cin >> choice;
ofstream ofs;
string fileName;
string tip; // 根据选项不同给不同的提示信息
if (choice == 1) {
// 添加学生
fileName = STUDENT_FILE;
tip = "请输入学号:";
}
else if (choice == 2) {
// 添加老师
fileName = TEACHER_FILE;
tip = "请输入职工编号:";
}
else {
cout << "选项有错误!" << endl;
return;
}
// 添加信息入文件
ofs.open(fileName,ios::out|ios::app); // 追加的方式写数据
int id;
string name;
string pwd;
while (true) {
cout << tip << endl;
cin >> id;
// 判断是否有重复学号或者职工编号
if (checkRepeat(fileName,id)) {
// 有重复的
cout << "该编号已存在!" << endl;
}
else {
break; // 跳出循环
}
}
cout << "请输入姓名:" << endl;
cin >> name;
cout << "请输入密码:" << endl;
cin >> pwd;
// 录入信息
ofs << id << " " << name << " " << pwd << " " << endl;
ofs.close();
cout << "录入完成!" << endl;
system("pause");
system("cls");
}
// 查看账号
void Manager::showPerson() {
cout << "请输入查看账号的类型" << endl;
cout << "1、查看学生" << endl;
cout << "2、查看老师" << endl;
int choice = 0;
cin >> choice;
ifstream ifs;
string fileName;
string p_id_name; // 学号还是职工编号
if (choice == 1) {
// 添加学生
fileName = STUDENT_FILE;
p_id_name = "学号";
}
else if (choice == 2) {
// 添加老师
fileName = TEACHER_FILE;
p_id_name = "职工编号";
}
else {
cout << "选项有错误!" << endl;
return;
}
int id;
string name;
string pwd;
ifs.open(fileName,ios::in);
while (ifs >> id && ifs >> name && ifs >> pwd) {
cout << p_id_name << id << " 姓名:" << name << " 密码:" << pwd << endl;
}
ifs.close();
}
// 查看机房信息
void Manager::showComputer() {
ifstream ifs;
string m_ComId;
string m_MaxNum;
ifs.open(COMPUTER_FILE, ios::in);
while (ifs >> m_ComId && ifs >> m_MaxNum) {
cout << "机房编号: " << m_ComId << " 机房最大容量: " << m_MaxNum << endl;
}
ifs.close();
}
// 清空预约记录
void Manager::clearFile() {
ofstream ofs;
ofs.open(ORDER_FILE, ios::trunc); // 如果存在清空
ofs.close();
}
// 显示管理员子菜单
void Manager::showSecondMenu()
{
cout << "欢迎管理员:" << this->m_name << "登录!" << endl;
cout << "\t\t ---------------------------------\n";
cout << "\t\t| |\n";
cout << "\t\t| 1.添加账号 |\n";
cout << "\t\t| |\n";
cout << "\t\t| 2.查看账号 |\n";
cout << "\t\t| |\n";
cout << "\t\t| 3.查看机房 |\n";
cout << "\t\t| |\n";
cout << "\t\t| 4.清空预约 |\n";
cout << "\t\t| |\n";
cout << "\t\t| 0.注销登录 |\n";
cout << "\t\t| |\n";
cout << "\t\t ---------------------------------\n";
cout << "请选择您的操作: " << endl;
}
Student.cpp
#include"student.h"
// 默认构造
Student::Student() {
}
// 有参构造
Student::Student(int id, string name, string pw) {
m_id = id;
m_name = name;
m_password = pw;
}
// 申请预约
void Student::applyOrder() {
// 相当于在order.txt中创建一条预约指令
cout << "机房开放时间为周一至周五!" << endl;
cout << "请输入申请预约的时间:" << endl;
cout << "1、周一" << endl;
cout << "2、周二" << endl;
cout << "3、周三" << endl;
cout << "4、周四" << endl;
cout << "5、周五" << endl;
int date = 0;
int interval = 0;
int room = 0;
while (true)
{
cin >> date;
if (date >= 1 && date <= 5)
{
break;
}
cout << "输入有误,请重新输入" << endl;
}
cout << "请输入申请预约的时间段:" << endl;
cout << "1、上午" << endl;
cout << "2、下午" << endl;
while (true)
{
cin >> interval;
if (interval >= 1 && interval <= 2)
{
break;
}
cout << "输入有误,请重新输入" << endl;
}
cout << "请选择机房:" << endl;
ifstream ifsCom;
string m_ComId;
string m_MaxNum;
ifsCom.open(COMPUTER_FILE, ios::in);
while (ifsCom >> m_ComId && ifsCom >> m_MaxNum) {
cout << "机房编号: " << m_ComId << " 机房最大容量: " << m_MaxNum << endl;
}
ifsCom.close();
while (true)
{
cin >> room;
if (room >= 1 && room <= 3)
{
break;
}
cout << "输入有误,请重新输入" << endl;
}
cout << "预约成功!审核中" << endl;
ofstream ofs(ORDER_FILE, ios::app);
ofs << "date:" << date << " ";
ofs << "interval:" << interval << " ";
ofs << "stuId:" << this->m_id << " ";
ofs << "stuName:" << this->m_name << " ";
ofs << "roomId:" << room << " ";
ofs << "status:" << 1 << endl;
ofs.close();
system("pause");
system("cls");
}
// 显示预约
void Student::showMyOrder() {
ifstream ifs;
ifs.open(ORDER_FILE, ios::in);
string date;
string interval;
string id;
string name;
string room;
string status;
while (ifs >> date && ifs >> interval && ifs >> id && ifs >> name && ifs >> room && ifs >> status) {
string t_name = name.substr(name.find(":")+1); // 拿到真实姓名
if (t_name.compare(this->m_name) == 0) {
cout << date << interval << id << name << room << status << endl;
}
}
ifs.close();
}
// 查看所有预约
void Student::showAllOrder() {
ifstream ifs;
ifs.open(ORDER_FILE, ios::in);
string date;
string interval;
string id;
string name;
string room;
string status;
while (ifs >> date && ifs >> interval && ifs >> id && ifs >> name && ifs >> room && ifs >> status) {
cout << date << interval << id << name << room << status << endl;
}
ifs.close();
}
map<int, map<string, string>> txtTomap() {
ifstream ifs;
ifs.open(ORDER_FILE, ios::in);
map<int, map<string, string>> Bigmap;
string date;
string interval;
string id;
string name;
string room;
string status;
int count = 0; // 序号
string line;
while (getline(ifs, line)) {
istringstream iss(line);
string date, interval, id, name, room, status;
if (iss >> date >> interval >> id >> name >> room >> status) {
map<string, string> mp;
mp.insert(make_pair("date", date));
mp.insert(make_pair("interval", interval));
mp.insert(make_pair("id", id));
mp.insert(make_pair("name", name));
mp.insert(make_pair("room", room));
mp.insert(make_pair("status", status));
Bigmap.insert(make_pair(count, mp));
count++;
}
}
ifs.close();
return Bigmap;
}
void mapToTxt(map<int, map<string, string>> Bigmap) {
ofstream ofs;
ofs.open(ORDER_FILE, ios::trunc);
for (map<int, map<string, string>>::iterator it = Bigmap.begin(); it != Bigmap.end(); it++) {
string date = (*it).second["date"];
string interval = (*it).second["interval"];
string id = (*it).second["id"];
string name = (*it).second["name"];
string room = (*it).second["room"];
string status = (*it).second["status"];
ofs << date << " ";
ofs << interval << " ";
ofs <<id << " ";
ofs << name << " ";
ofs << room << " ";
ofs << status << endl;
}
ofs.close();
}
// 取消预约
void Student::cancelOrder() {
map<int, map<string, string>> Bigmap = txtTomap();
ifstream ifs;
ifs.open(ORDER_FILE, ios::in);
string date;
string interval;
string id;
string name;
string room;
string status;
int count = 1; // 计数器
int target;
cout << "请输入你要修改第几条记录:" << endl;
cin >> target;
string line;
while (getline(ifs, line)) {
istringstream iss(line);
string date, interval, id, name, room, status;
if (iss >> date >> interval >> id >> name >> room >> status) {
string t_name = name.substr(name.find(":") + 1);
if (count == target) {
if (t_name == this->m_name) {
Bigmap[count - 1]["status"] = "status:0";
cout << "修改成功!" << endl;
}
else {
cout << "修改失败!" << endl;
}
}
count++;
}
}
mapToTxt(Bigmap);
ifs.close();
}
// 显示学生子菜单
void Student::showSecondMenu()
{
cout << "欢迎学生代表:" << this->m_name << "登录!" << endl;
cout << "\t\t ----------------------------------\n";
cout << "\t\t| |\n";
cout << "\t\t| 1.申请预约 |\n";
cout << "\t\t| |\n";
cout << "\t\t| 2.查看我的预约 |\n";
cout << "\t\t| |\n";
cout << "\t\t| 3.查看所有预约 |\n";
cout << "\t\t| |\n";
cout << "\t\t| 4.取消预约 |\n";
cout << "\t\t| |\n";
cout << "\t\t| 0.注销登录 |\n";
cout << "\t\t| |\n";
cout << "\t\t ----------------------------------\n";
cout << "请选择您的操作: " << endl;
}
#include
using namespace std;
#include "Identity.h"
#include
#include "student.h"
#include "teacher.h"
#include "manager.h"
void managerMenu(Identity*& manager)
{
while (true)
{
//管理员菜单
manager->showSecondMenu();
Manager* man = (Manager*)manager;
int select = 0;
cin >> select;
if (select == 1) //添加账号
{
cout << "添加账号" << endl;
man->addPerson();
}
else if (select == 2) //查看账号
{
cout << "查看账号" << endl;
man->showPerson();
}
else if (select == 3) //查看机房
{
cout << "查看机房" << endl;
man->showComputer();
}
else if (select == 4) //清空预约
{
cout << "清空预约" << endl;
man->clearFile();
}
else
{
delete manager;
cout << "注销成功" << endl;
system("pause");
system("cls");
return;
}
}
}
//学生菜单
void studentMenu(Identity*& student)
{
while (true)
{
//学生菜单
student->showSecondMenu();
Student* stu = (Student*)student;
int select = 0;
cin >> select;
if (select == 1) //申请预约
{
stu->applyOrder();
}
else if (select == 2) //查看自身预约
{
stu->showMyOrder();
}
else if (select == 3) //查看所有预约
{
stu->showAllOrder();
}
else if (select == 4) //取消预约
{
stu->cancelOrder();
}
else
{
delete student;
cout << "注销成功" << endl;
system("pause");
system("cls");
return;
}
}
}
void TeacherMenu(Identity*& teacher)
{
while (true)
{
Teacher* tea = (Teacher*)teacher;
//教师菜单
teacher->showSecondMenu();
int select = 0;
cin >> select;
if (select == 1)
{
//查看所有预约
tea->showAllOrder();
}
else if (select == 2)
{
//审核预约
tea->vaildOrder();
}
else
{
delete teacher;
cout << "注销成功" << endl;
system("pause");
system("cls");
return;
}
}
}
void showmenu() {
cout << "====================== 欢迎来到机房预约系统 =====================" << endl;
cout << "\t\t -------------------------------\n";
cout << "\t\t| |\n";
cout << "\t\t| 1.学生代表 |\n";
cout << "\t\t| |\n";
cout << "\t\t| 2.老 师 |\n";
cout << "\t\t| |\n";
cout << "\t\t| 3.管 理 员 |\n";
cout << "\t\t| |\n";
cout << "\t\t| 0.退 出 |\n";
cout << "\t\t| |\n";
cout << "\t\t -------------------------------\n";
}
// 登录验证的全局函数
void LoginIn(string Filename, int type) {
// Filename表示应该读哪个文件,type表示哪一个类别角色
Identity* person = NULL;
int id=0;
string name;
string pwd;
// 创建读文件对象
ifstream ifs;
ifs.open(Filename,ios::in);
// 判断文件是否存在
if (!ifs.is_open()) {
cout << "文件不存在!" << endl;
ifs.close();
return;
}
else {
if (type == 1) {
// 学生 提示输入学号
cout << "请输入学号:" << endl;
cin >> id;
}
else if(type == 2) {
// 教师 提示输入教工号
cout << "请输入职工号:" << endl;
cin >> id;
}
cout << "请输入姓名:" << endl;
cin >> name;
cout << "请输入密码:" << endl;
cin >> pwd;
if (type == 1) {
// 学生登录
int Fid;
string Fname;
string Fpwd;
while (ifs >> Fid && ifs >> Fname && ifs >> Fpwd) {
if (Fid == id && (Fname.compare(name) == 0) && (Fpwd.compare(pwd) == 0)) {
cout << "登录成功!" << endl;
// 创建学生对象
person = new Student(id, name, pwd);
studentMenu(person);
system("pause");
system("cls");
return; // 退出
}
}
}
else if (type == 2) {
// 教师登录
int Fid;
string Fname;
string Fpwd;
while (ifs >> Fid && ifs >> Fname && ifs >> Fpwd) {
if (Fid == id && (Fname.compare(name) == 0) && (Fpwd.compare(pwd) == 0)) {
cout << "登录成功!" << endl;
// 创建教师对象
person = new Teacher(id, name, pwd);
TeacherMenu(person);
system("pause");
system("cls");
return; // 退出
}
}
}
else if (type == 3) {
// 管理员登录
string Fname;
string Fpwd;
while (ifs >> Fname && ifs >> Fpwd) {
if ((Fname.compare(name) == 0) && (Fpwd.compare(pwd) == 0)) {
cout << "登录成功!" << endl;
// 创建管理员对象
person = new Manager(name, pwd);
managerMenu(person);
system("pause");
system("cls");
return; // 退出
}
}
}
}
cout << "登录失败!" << endl;
system("pause");
system("cls");
}
int main() {
int num=0;
while (true)
{
showmenu();
cout << "请输入你的身份:";
cin >> num;
switch (num)
{
// 进入学生子菜单
case 1:
LoginIn(STUDENT_FILE, 1);
break;
// 进入老师子菜单
case 2:
LoginIn(TEACHER_FILE, 2);
break;
// 进入管理员子菜单
case 3:
LoginIn(ADMIN_FILE, 3);
break;
// 退出
case 0:
cout << "欢迎下次使用!" << endl;
return 0;
default:
cout << "没有这个选项,请重新输入!" << endl;
break;
}
}
system("pause");
return 0;
}
====================== 欢迎来到机房预约系统 =====================
-------------------------------
| |
| 1.学生代表 |
| |
| 2.老 师 |
| |
| 3.管 理 员 |
| |
| 0.退 出 |
| |
-------------------------------
请输入你的身份:1
请输入学号:
1
请输入姓名:
张三
请输入密码:
123
登录成功!
欢迎学生代表:张三登录!
----------------------------------
| |
| 1.申请预约 |
| |
| 2.查看我的预约 |
| |
| 3.查看所有预约 |
| |
| 4.取消预约 |
| |
| 0.注销登录 |
| |
----------------------------------
请选择您的操作:
3
date:1interval:1stuId:1stuName:张三roomId:1status:2
date:1interval:1stuId:1stuName:张三roomId:1status:2
date:1interval:1stuId:1stuName:张三roomId:1status:0
date:2interval:2stuId:2stuName:李四roomId:2status:1
date:2interval:1stuId:2stuName:李四roomId:2status:0
欢迎学生代表:张三登录!
----------------------------------
| |
| 1.申请预约 |
| |
| 2.查看我的预约 |
| |
| 3.查看所有预约 |
| |
| 4.取消预约 |
| |
| 0.注销登录 |
| |
----------------------------------
请选择您的操作:
2
date:1interval:1stuId:1stuName:张三roomId:1status:2
date:1interval:1stuId:1stuName:张三roomId:1status:2
date:1interval:1stuId:1stuName:张三roomId:1status:0
欢迎学生代表:张三登录!
----------------------------------
| |
| 1.申请预约 |
| |
| 2.查看我的预约 |
| |
| 3.查看所有预约 |
| |
| 4.取消预约 |
| |
| 0.注销登录 |
| |
----------------------------------
请选择您的操作:
4
请输入你要修改第几条记录:
2
修改成功!
欢迎学生代表:张三登录!
----------------------------------
| |
| 1.申请预约 |
| |
| 2.查看我的预约 |
| |
| 3.查看所有预约 |
| |
| 4.取消预约 |
| |
| 0.注销登录 |
| |
----------------------------------
请选择您的操作:
3
date:1interval:1stuId:1stuName:张三roomId:1status:2
date:1interval:1stuId:1stuName:张三roomId:1status:0
date:1interval:1stuId:1stuName:张三roomId:1status:0
date:2interval:2stuId:2stuName:李四roomId:2status:1
date:2interval:1stuId:2stuName:李四roomId:2status:0
欢迎学生代表:张三登录!
----------------------------------
| |
| 1.申请预约 |
| |
| 2.查看我的预约 |
| |
| 3.查看所有预约 |
| |
| 4.取消预约 |
| |
| 0.注销登录 |
| |
----------------------------------
请选择您的操作:
====================== 欢迎来到机房预约系统 =====================
-------------------------------
| |
| 1.学生代表 |
| |
| 2.老 师 |
| |
| 3.管 理 员 |
| |
| 0.退 出 |
| |
-------------------------------
请输入你的身份:2
请输入职工号:
1
请输入姓名:
老王
请输入密码:
123456
登录成功!
欢迎教师:老王登录!
----------------------------------
| |
| 1.查看所有预约 |
| |
| 2.审核预约 |
| |
| 0.注销登录 |
| |
----------------------------------
请选择您的操作:
1
date:1interval:1stuId:1stuName:张三roomId:1status:2
date:1interval:1stuId:1stuName:张三roomId:1status:0
date:1interval:1stuId:1stuName:张三roomId:1status:0
date:2interval:2stuId:2stuName:李四roomId:2status:1
date:2interval:1stuId:2stuName:李四roomId:2status:0
欢迎教师:老王登录!
----------------------------------
| |
| 1.查看所有预约 |
| |
| 2.审核预约 |
| |
| 0.注销登录 |
| |
----------------------------------
请选择您的操作:
2
date:1interval:1stuId:1stuName:张三roomId:1status:2
date:1interval:1stuId:1stuName:张三roomId:1status:0
date:1interval:1stuId:1stuName:张三roomId:1status:0
date:2interval:2stuId:2stuName:李四roomId:2status:1
date:2interval:1stuId:2stuName:李四roomId:2status:0
请输入你要审核第几条记录:
2
欢迎教师:老王登录!
----------------------------------
| |
| 1.查看所有预约 |
| |
| 2.审核预约 |
| |
| 0.注销登录 |
| |
----------------------------------
请选择您的操作:
====================== 欢迎来到机房预约系统 =====================
-------------------------------
| |
| 1.学生代表 |
| |
| 2.老 师 |
| |
| 3.管 理 员 |
| |
| 0.退 出 |
| |
-------------------------------
请输入你的身份:3
请输入姓名:
admin
请输入密码:
123
登录成功!
欢迎管理员:admin登录!
---------------------------------
| |
| 1.添加账号 |
| |
| 2.查看账号 |
| |
| 3.查看机房 |
| |
| 4.清空预约 |
| |
| 0.注销登录 |
| |
---------------------------------
请选择您的操作:
2
查看账号
请输入查看账号的类型
1、查看学生
2、查看老师
1
学号1 姓名:张三 密码:123
学号2 姓名:李四 密码:456
欢迎管理员:admin登录!
---------------------------------
| |
| 1.添加账号 |
| |
| 2.查看账号 |
| |
| 3.查看机房 |
| |
| 4.清空预约 |
| |
| 0.注销登录 |
| |
---------------------------------
请选择您的操作:
2
查看账号
请输入查看账号的类型
1、查看学生
2、查看老师
2
职工编号1 姓名:老王 密码:123456
欢迎管理员:admin登录!
---------------------------------
| |
| 1.添加账号 |
| |
| 2.查看账号 |
| |
| 3.查看机房 |
| |
| 4.清空预约 |
| |
| 0.注销登录 |
| |
---------------------------------
请选择您的操作:
3
查看机房
欢迎管理员:admin登录!
---------------------------------
| |
| 1.添加账号 |
| |
| 2.查看账号 |
| |
| 3.查看机房 |
| |
| 4.清空预约 |
| |
| 0.注销登录 |
| |
---------------------------------
请选择您的操作:
1
添加账号
请输入添加账号的类型
1、添加学生
2、添加老师
1
请输入学号:
1
该编号已存在!
请输入学号:
3
请输入姓名:
赵六
请输入密码:
678
录入完成!
请按任意键继续. . .