a) Write a crypto exchange simulation. Develop a console application that has Traders (N=5…10)
and one Crypto Exchange. Each trader and the exchange are separate threads, and all threads
are working concurrently. When the crypto exchange (main thread) starts, it spawns the
traders and when it finishes, it safely terminates traders’ threads.
b) Write a crypto Exchange logging service. Add new functionality to your program by logging
every transaction made on an Exchange. The exchange should log every transaction made by
all traders to a (market.log) file with each transaction on a separate line. Each transaction
should be timestamped as well. This should be achieved by adding functionality to an
Exchange class, Modification to a Trader class should not be necessary.
Write a Traders logging service. Add new functionality to your program by logging every
transaction each trader has made. Each transaction should be logged in a single file
(trades.log – one file for all the traders) with each transaction on a separate line. All active
traders should append every transaction to a trades.log file. Every transaction must have a
timestamp, unique trader ID (thread ID or custom name) and the value a trader class
randomly generated (amount of satoshi). This should be achieved by modifying a Trader class,
not an Exchange class.