Question: Project 3 Daily Ledger C++ project using arrays and classes Problem Description: You are to implement a program for creating a daily transaction ledger for
Project 3 Daily Ledger
C++ project using arrays and classes
Problem Description:
You are to implement a program for creating a daily transaction ledger for a shop. For this project, you will need to utilize the concepts of arrays and object creation that have been discussed in class. The list of requirements and constraints for the system are as follows:
1. The system must be able to maintain records of all transactions done on a date. Each transaction will occur at a given time, identified by the hour, minute, and second. In addition, each transaction will have a unique ID (a number) for each transaction that will be randomly generated by the system. You can assume no more than 10 transactions will happen on a single date. You must ensure that each transaction ID is unique. You can find more information on generating random numbers by going to http://www.cplusplus.com/reference/cstdlib/rand/.
2. For each transaction, an item will be sold. This item will have a name, a cost price, and a selling price, with the selling price greater than the cost price for a profit (selling price cost price). Each item should have a different selling price and profit.
3. It is possible that a transaction will be voided in which case that transaction should be deleted from the system. If the maximum of 10 transactions does not exist in the system, then more transactions should be possible for the day.
4. Each day a summary of transactions will be printed. The summary will include for each transaction, the time of the transaction, the transaction ID, the name of the item, the cost price of the item, the selling price of the item and the profit.
5. You will need to create a console menu for using the system. This menu should allow you to create a new transaction, void a transaction, and print a summary of transactions. To create a new transaction, the user will be prompted to enter the hour, minute, and second of the transaction, and then to enter the details for the item being sold. To void a transaction, the user should enter the transactions ID (obtainable through the summary discussed next). The summary will include for each transaction, the time of the transaction, the transaction ID, the name of the item, the cost price of the item, the selling price of the item and the profit. In addition, after printing the transactions, it will print the total profit for the day and the average profit for each item.
6. After selecting to print the summary, you will offer a menu of choices for the order in which transactions are printed in the summary. The choices will allow the user to choose to sort the transactions by transaction ID, by item names (alphabetically), or by increasing order of profit. You can choose any of the sorting algorithms described in the class for this. It is recommended that in order to test your system, you create some test data for transactions so that you do not need to reenter data each time you run the system. However, you should not include this test data in the final submission.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
