We have all gone shopping before, whether for groceries, computer gadgets or milk and eggs. We expectthat the cashier (human or automatic) identifies and enters a code for each item we purchase and afterentering all the items a transaction receipt is issued, we pay and go home. We may not have directexperience of running the store, but it is not hard to imagine that the transaction data is stored in a file. Atthe end of the day, that file, which contains all the day’s transactions for the number of customers whomade purchases, can be processed to obtain such things as the numbers of items sold (by individual item,or by category such as meat or chewing gum) and the amount of revenue (i.e. money) obtained. This isillustrated in Figure 1.Your task is to design and write a complete C language program to carry out the job described above, ingeneral terms. The details of this task are stated in the following paragraphs. Note that several examplesare provided on following pages in order to explain and guide you in understanding your task and how toapproach it. This problem is designed to examine your understanding of file processing, and dynamicmemory allocation and linked list concepts and techniques, in addition to other programming techniques.
We have all gone shopping before, whether for groceries, computer gadgets or milk and eggs. We expect<br>that the cashier (human or automatic) identifies and enters a code for each item we purchase and after<br>entering all the items a transaction receipt is issued, we pay and go home. We may not have direct<br>experience of running the store, but it is not hard to imagine that the transaction data is stored in a file. At<br>the end of the day, that file, which contains all the day’s transactions for the number of customers who<br>made purchases, can be processed to obtain such things as the numbers of items sold (by individual item,<br>or by category such as meat or chewing gum) and the amount of revenue (i.e. money) obtained. This is<br>illustrated in Figure 1.<br>Your task is to design and write a complete C language program to carry out the job described above, in<br>general terms. The details of this task are stated in the following paragraphs. Note that several examples<br>are provided on following pages in order to explain and guide you in understanding your task and how to<br>approach it. This problem is designed to examine your understanding of file processing, and dynamic<br>memory allocation and linked list concepts and techniques, in addition to other programming techniques.
正在翻译中..