1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- /*
- This is a test project.
- */
- #include <iostream>
- #include <cstdlib>
- #include "src/student.h"
- #include "src/show.h"
- #include "src/student.cpp"
- #include "src/show.cpp"
- int main(void) {
- using namespace std;
- int choice, i = 1;
- char *id;
- show studentshow;
- while (i) {
- cout << endl;
- cout << "欢迎使用猫学籍管理系统 Alpha!" << endl;
- cout << "本程序采用 WTFPL 自由软件许可证开源。" << endl;
- cout << " - - - " << endl;
- cout << " [ 1 ] 新建学生数据 " << endl;
- cout << " [ 2 ] 修改学生数据 " << endl;
- cout << " [ 3 ] 查询学生数据 " << endl;
- cout << " [ 4 ] 删除学生数据 " << endl;
- cout << " [ 5 ] 输出所有数据 " << endl;
- cout << " [ 6 ] 关于该系统 " << endl;
- cout << " [ 7 ] 退出该系统 " << endl;
- cout << " - - - " << endl;
- cout << "请选择您的操作: ";
- cin >> choice;
- switch (choice) {
- case 1:
- studentshow.setdata();
- break;
- case 2:
- cout << "请输入您要修改的学生学号:";
- cin >> id;
- studentshow.changedata(id);
- break;
- case 3:
- cout << "请输入您要查询的学生学号:";
- cin >> id;
- studentshow.inquirynum(id);
- break;
- case 4:
- cout << "请输入您要删除的学生学号:";
- cin >> id;
- studentshow.deletedata(id);
- break;
- case 5:
- studentshow.pulldata();
- break;
- case 6:
- cout << "本程序采用 WTFPL 协议并开源,详情请看 README 文件。" << endl;
- cout << "如遇到 BUG,请汇报给开发者。" << endl;
- break;
- case 7:
- i = 0;
- }
- }
- return 0;
- }
|