当前位置:网站首页>[C language course design] C language campus card management system
[C language course design] C language campus card management system
2022-07-31 00:26:00 【coding gas station】
如需全部代码,关注公众号(coding加油站)回复“CLanguage Campus Card”免费领取.
视频演示:
【coding加油站】CLanguage Campus Card Management System
1、功能设计
cThe program of the language campus card management system is divided into nine modules, and there are the following modules::
- Show established campus cards(This module is for statistics of campus cards that have completed registration )
- Create a campus card(This module is for freshmen joining some new campus cards after joining)
- 买饭
- 续钱
- Add a campus card
- Cancel campus card
- 设置与解除挂失
- Statistics of the number of reported lost
- 退出程序
2、详细设计
2.1、流程逻辑
Student submits personal information to administrator,The system automatically checks whether the information is complete,and make corresponding prompts,system based on user input,Automatic card for sole distributionID,One cartoon activated after registration,Data file response update,And create a card record table,Record one-card recharge、消费、修改、Loss reporting and other information.
消费模块:用户在消费时,The system determines whether the user's card is valid,Whether the daily consumption amount of the one-card card exceeds the limit,Is the balance of the card enough?,When consumption for pricing,The user deducts the information according to the face value of the price,Then update the data file,Modify the history of the card information,If the card enters the loss reporting state, it cannot be used for consumption.
2.2、算法流程图
3、编码
3.1数据结构定义
struct fanka{
char number[20];
char name[20];
int zhuangtai;
float yue;
}fanka[MAX];
3.2、功能函数设计
主函数 main()
函数的功能:Used to contact each functional function module,And the exit screen prompt when exiting the program.
函数的入口:The whole program starts from the main function.
函数的出口:当从main()的oveEnter at the beginning of the function,The welcome interface is displayed;跳出while循环,然后退出main()函数,即:退出整个程序.
函数调用关系:This function is not called by other functions.
- 1、功能函数void jianli();
函数的功能:Create and store new card data
函数的入口:从主函数main()进入
函数的调用关系:被jianli()函数调用.由switch(choose)into the switch structure,choose值为1时进入.
函数的出口:When outputting the result information withprintf()stdout to the screen,then end the function,而执行jianli()函数中“break;”跳出switch()开关函数,继续执行while循环结构.
- 2、功能函数void maifan();
函数的功能:One-card consumption function,The remaining data in the card after consumption is stored.
函数的入口:从maifan()的switch()into the switch structure,即choose的值为2的时侯,进入该函数,Start sorting book information by the first letter of the title,Then save the sorted results to a file“缓存区”中.
函数的调用关系:被maifan()函数调用.由switch(choose)into the switch structure,choose值为2时进入.
函数的出口:When outputting the result information withprintf()stdout to the screen,then end the function,而执行maifan()函数中“break;”跳出switch()开关函数,继续执行while循环结构.
- 3、功能函数void xuqian();
函数的功能:Change the data in the balance data of the original card and then store the data.
函数的入口:xvqian()的switch()into the switch structure,即choose的值为2的时侯,进入该函数,Start sorting book information by the first letter of the title,Then save the sorted results to a file“缓存区”中.
函数的调用关系:被xvqian()函数调用.由switch(choose)into the switch structure,choose值为3时进入.
函数的出口:When outputting the result information withprintf()stdout to the screen,then end the function,而执行xvqian()函数中“break;”跳出switch()开关函数,继续执行while循环结构.
- 4、功能函数void tianjia();
函数的功能:Continue to add new one-card data based on the original one-card data.
函数的入口:tianjia()的switch()into the switch structure,即choose的值为2的时侯,进入该函数,Start sorting book information by the first letter of the title,Then save the sorted results to a file“缓存区”中.
函数的调用关系:被tianjia()函数调用.由switch(choose)into the switch structure,choose值为4时进入.
函数的出口:When outputting the result information withprintf()stdout to the screen,then end the function,而执行tianjia()函数中“break;”跳出switch()开关函数,继续执行while循环结构.
- 5、功能函数void shanchu();
函数的功能:Delete the original one-card data.
函数的入口:shanhcu()的switch()into the switch structure,即choose的值为2的时侯,进入该函数,Start sorting book information by the first letter of the title,Then save the sorted results to a file“缓存区”中.
函数的调用关系:shanchu()函数调用.由switch(choose)into the switch structure,choose值为5时进入.
函数的出口:When outputting the result information withprintf()stdout to the screen,then end the function,而执行shanchu()函数中“break;”跳出switch()开关函数,继续执行while循环结构.
- 6、功能函数void guashi();
函数的功能:Lock and report lost cards.
函数的入口:guashi()的switch()into the switch structure,即choose的值为2的时侯,进入该函数,Start sorting book information by the first letter of the title,Then save the sorted results to a file“缓存区”中.
函数的调用关系:guashi()函数调用.由switch(choose)into the switch structure,choose值为6时进入.
函数的出口:When outputting the result information withprintf()stdout to the screen,then end the function,而执行guashi()函数中“break;”跳出switch()开关函数,继续执行while循环结构.
- 7、功能函数void tonggua();
函数的功能:Used to count the number of reported losses.
函数的入口:tonggua()的switch()into the switch structure,即choose的值为2的时侯,进入该函数,Start sorting book information by the first letter of the title,Then save the sorted results to a file“缓存区”中.
函数的调用关系:tonggua()函数调用.由switch(choose)into the switch structure,choose值为7时进入.
函数的出口:When outputting the result information withprintf()stdout to the screen,then end the function,而执行tonggua()函数中“break;”跳出switch()开关函数,继续执行while循环结构.
- 8、功能函数void xianshi();
函数的功能:Display the information of the created card.
函数的入口:xianshi()的switch()into the switch structure,即choose的值为2的时侯,进入该函数,Start sorting book information by the first letter of the title,Then save the sorted results to a file“缓存区”中.
函数的调用关系:xianshi()函数调用.由switch(choose)into the switch structure,choose值为7时进入.
函数的出口:When outputting the result information withprintf()stdout to the screen,then end the function,而执行xianshi()函数中“break;”跳出switch()开关函数,继续执行while循环结构.
4、函数流程图
(1)Update recharge card information
(2)消费模块
(3)Lost and unsolicited
(4)delete card information
如需全部代码,关注公众号(coding加油站)回复“CLanguage Campus Card”免费领取
边栏推荐
- Error occurred while trying to proxy request项目突然起不来了
- Error ER_NOT_SUPPORTED_AUTH_MODE Client does not support authentication protocol requested by serv
- A Brief Talk About MPI
- 【愚公系列】2022年07月 Go教学课程 013-常量、指针
- what is jira
- Axure Carousel
- MPI简谈
- Go study notes (84) - Go project directory structure
- [In-depth and easy-to-follow FPGA learning 15---------- Timing analysis basics]
- web漏洞之需要准备的工作
猜你喜欢
随机推荐
unity2D横版游戏教程4-物品收集以及物理材质
How to solve the error of joiplay simulator
Optimization of aggregate mentioned at DATA AI Summit 2022
ABC 261 F - Sorting Color Balls(逆序对)
joiplay模拟器如何使用
Understand from the 11 common examples of judging equality of packaging types in the written test: packaging types, the principle of automatic boxing and unboxing, the timing of boxing and unboxing, a
xss靶机训练【实现弹窗即成功】
WMware Tools安装失败segmentation fault解决方法
会议OA项目待开会议、所有会议功能
Error in go mode tidy go warning “all” matched no packages
xss绕过:prompt(1)
The difference between substring and substr in MySQL
WEB安全基础 - - -漏洞扫描器
binglog log tracking: data backup and backup tracking
网络常用的状态码
Jetpack Compose学习(8)——State及remeber
Mysql体系化之JOIN运算实例分析
Gabor filter study notes
MySQL数据库的truncate与delete区别
ES 中时间日期类型 “yyyy-MM-dd HHmmss” 的完全避坑指南