Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 in 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..
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started