using oop cconcepts write a c++ class to implment a transaction log that records all customers transaction in a store.
each transaction contains the following items.
use a dynamic array to record all transactions.the transaction log should offer the following member functions.
1.suitable constructors to allocate the dynamic array of transactions.
2.generate randomData():uses the rand()functions to generate random values for all transaction items.
3.displayData():print out all the transactions to the screen.
4.writeDataToFile() :accept a file name as a parameter and write all transactions to the file.
5.insertTransaction():take a transaction as a parameter and insert it at the end of the transaction array.
6.searchTransaction():take a transaction as a parameter and look in it in the trnsaction array.if the transaction is available then it is printed to the screen.if it not,then the function should display a not found message.
7.deleteTransaction:take a tra
nsaction as a parameter and delete it.if the transaction does not exist,an error message should be displayed.
implement a main()function to test all methods mentioned above.
All 3 RepliesReply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.