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

Wallet (STORE IN A STRUCT)
For our Wallet struct, we need to store a few things
1) We need to store the ticker symbol for the coin ie BTC
2) We need to store how many coins we currently have
3) 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 in the wallet.
4) 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..

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!