Question: Required Items Wallet ( STORE IN A STRUCT ) For our Wallet struct, we need to store a few things We need to store the

Required Items
Wallet (STORE IN A STRUCT)
For our Wallet struct, we need to store a few things
We need to store the ticker symbol for the coin ie "BTC"
We need to store how many coins we currently have
We also need to be able to "print" the information in the structure out. It will print out the ticker symbol (BTC) for the coin and the number of coins currently tin the wallet.
You should pass the wallet struct to the methods that need it, you can think of the buy and sell methods as the setter function to add coins to the wallet and update the cash, and you can think of the getlive function as a getter function to get a simulated live value for bitcoin..
Ledger (STORE IN A STRUCT)
Inside the structure you can store the history either as an array of strings along with a number n which is the current number of strings in the array that are valid, or as a linked list of strings. I have linked list code in the class notes.
We need a procedure that is going to turn our transactions into a string and store them for our history.
 Required Items Wallet (STORE IN A STRUCT) For our Wallet struct,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!