当前位置:网站首页>[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”免费领取
边栏推荐
- [In-depth and easy-to-follow FPGA learning 15---------- Timing analysis basics]
- Asser uses ant sword to log in
- Xss target drone training [success when pop-up window is realized]
- transition transition && animation animation
- asser利用蚁剑登录
- 网络常用的状态码
- Steven Giesel recently published a 5-part series documenting his first experience building an application with the Uno Platform.
- How to use joiplay emulator
- 作业:iptables防止nmap扫描以及binlog
- 会议OA项目待开会议、所有会议功能
猜你喜欢
从笔试包装类型的11个常见判断是否相等的例子理解:包装类型、自动装箱与拆箱的原理、装箱拆箱的发生时机、包装类型的常量池技术
Xss target drone training [success when pop-up window is realized]
IOT cross-platform component design scheme
【深入浅出玩转FPGA学习13-----------测试用例设计1】
从两个易错的笔试题深入理解自增运算符
牛客网刷题训练(四)
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
正则表达式密码策略与正则回溯机制绕过
MySQL master-slave replication and read-write separation script - pro test available
神经网络(ANN)
随机推荐
SWM32系列教程6-Systick和PWM
firewalld
How to install joiplay emulator rtp
firewalld
46.
Steven Giesel 最近发布了一个由5部分内容组成的系列,记录了他首次使用 Uno Platform 构建应用程序的经验。
joiplay模拟器如何使用
从笔试包装类型的11个常见判断是否相等的例子理解:包装类型、自动装箱与拆箱的原理、装箱拆箱的发生时机、包装类型的常量池技术
transition transition && animation animation
An easy-to-use interface testing tools - the Postman
WEB安全基础 - - -漏洞扫描器
【Yugong Series】July 2022 Go Teaching Course 017-IF of Branch Structure
【多线程】
joiplay模拟器如何调中文
MySQL系列一:账号管理与引擎
[In-depth and easy-to-follow FPGA learning 14----------Test case design 2]
Summary of the stock problem of state machine dynamic programming
Shell programming conditional statement test command Integer value, string comparison Logical test File test
从两个易错的笔试题深入理解自增运算符
xss靶机训练【实现弹窗即成功】