In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to use C language to implement the sales management system. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The details are as follows
I. introduction to the topic of C programming course Design
The design requires students to design and develop a set of "sales management system" software based on the sales management business of a company.
Through the design process of this topic, we can cultivate students' idea of structured programming, deepen their understanding of the basic language elements and control structure of high-level language, and train according to the key and difficult contents of c language. complete programming tasks with a certain amount of work independently, while emphasizing good programming style. Get comprehensive training in software engineering to improve the ability to solve practical problems.
II. The task of C programming course design
1. Consult documents and materials, generally more than 5 articles
2. Taking the sales management business of a company as the background, through the investigation and analysis of the existing management mode and existing management software, the system model is established.
3. Complete the software structure design and algorithm design.
4. Complete the software development and testing of the system.
5. Write the design manual
6. Do a good job in defense.
III. The main contents, functions and technical indicators of C programming course design.
1. Problem analysis and solution framework determination: fully analyze and understand the problem itself, and figure out what is required. In the process of determining the solution framework, comprehensively consider the system function, consider how to make the system structure clear, reasonable, simple and easy to debug. Finally, determine the simple function of each procedure and function, as well as the call relationship between procedures (or functions), and draw the call relationship diagram between functions.
2. Detailed design and coding: define the corresponding storage structure, determine the algorithm of each function, and draw the flow chart, on the basis of which the code is designed. Each clear functional module program is generally no more than 60 lines, otherwise it will be further divided.
3. The static check of the program before getting on the computer: the static check of the program before getting on the computer can effectively improve the debugging efficiency and reduce the unnecessary errors when debugging the program. There are two main ways of static inspection: to execute the program manually with a set of test data, and to understand the program logic deeply and comprehensively by reading or explaining your own program to others. Eliminate obvious errors in the program in advance.
4. Program debugging and testing: using bottom-up, sub-module, that is, debugging low-level functions first. Be able to skillfully master the various functions of debugging tools, design test data to determine doubtful points, and confirm it or bypass it by modifying the program. After debugging correctly, carefully organize the source program and its comments to form a good format and style of the source program list and results.
5. Complete the course design report
① requirements and specifications: design title and problem description: what is the problem to be solved
② design ideas: main algorithm ideas, program function diagrams, call relationship diagrams between functions
The design indicates that the function of each function or procedure, lists the procedures or functions called by each procedure or function, and draws the flow chart of each function.
Detailed design: pseudo code of the main algorithm
③ debugging report: how to solve the main problems encountered during debugging; retrospective discussion and analysis of design and coding; improvement ideas; experience and experience, etc.
④ program implementation annotations
⑤ appendix: source program list and results. If the test data is specified in the title, the results are required to include the test data and run output, as well as other test data and run output.
6. A company has four salespeople (serial number: 1-4) who are responsible for selling five products (serial number: 1-5). Each salesperson will write a note for each product sold that day. Each note contains the following contents: the salesperson's code name, the product's code name, and the sales of the product on the same day. Each salesperson may hand in 0-5 notes a day. Suppose, after collecting all the notes from last month, write a processing system, read last month's sales, and do the following:
The system works as a menu, and the input information is saved in a file; calculate the sales of each product in the last month; sort the salespeople by sales, and output the sorting results (salesperson code); count the total sales of each product, and output the sorting results (product code and sales) according to the order from top to bottom.
Here is the source code:
# include "stdio.h" / * input / output function * / # include "stdlib.h" / * generic application function * / typedef struct/* defines structure variables * / {int gonghao; / * salesperson code * / int A1; / * product generation number * / int a2; / * product generation number * / int A3; / * product generation number * / int a4 / * product code 4 * / int a5; / * product code 5 * /} DATA;int menu_select (); / * declaration function * / int enter (); / * declaration function * / void salor (int n); / * declaration function * / int sum (DATA t, int n, int e); / * declaration function * / void list1 (int n); / * declaration function * / void list2 () / * declare function * / main () / * main function * / {int length; system ("color 3b"); for (;) / * Infinite Loop * / {switch (menu_select ()) / * determine which function to call according to the user's choice * / {case 1:length=enter (); break; case 2:salor (length); break; case 3:list1 (length); break Case 4:list2 (); break; case 0:exit (0);} int menu_select () / * menu function * / {int n; printf ("menu\ n\ n") Printf ("designer: Wu Jikang and Fu Pengyang Class: computer Class 1"); printf ("1 enter the contents on the note\ n"); printf ("2 Statistics of each product sold per person last month\ n"); printf ("3 ranks salespeople by sales\ n"); printf ("4 sales report\ n") Printf ("0 exit\ n"); printf ("- end--\ n\ n"); printf ("Please enter (0-4)"); scanf ("% d", & n); return n } int enter () / * list input * / {int iNum; FILE * fp; DATA t [100]; printf ("Please enter the number of notes to write:\ n"); scanf ("% d", & num); printf ("work number computer TV refrigerator Fan Mobile phone"); for
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.