Question
C++ Programming Problem Below is the UML of the Wallet class: Wallet - balance : float - address : string - signature : string +
C++ Programming Problem
Below is the UML of the Wallet class: Wallet - balance : float - address : string - signature : string + Wallet(): + getAddress(): string + getSignature(): string + deposit(v : float): void + withdraw(v : float): void + getBalance(): float - generateAddress(): void - generateSignature(): void Member Variables: balance - stores the bitcoin balance of the user, initially set to zero. address - it is a 10-character hexadecimal value which represents the account number of the user. The value is initialized in the constructor. 10 signature - a digital signature made up of a hashed random string used by a Bitcoin user to sign his/her transactions as assurance that they belong to him/her. The value is initialized in the constructor. Member Functions: Wallet() - calls the private functions generateAddress() and generateSignature () to obtain an address through which a user can transact, and a signature for signing any transactions. getAdress() and getSignature() - the accessor functions that return the relevant content deposit(float v) and withdraw(float v) - modify the account balance with the amount contained in v. You do not need to validate the balance in the case of a withdrawal. generateAddress() - generates a random hexadecimal string of 10 characters in length and sets that value as the account address. generateSignature() - generates a random alphanumeric string of 20 characters in length and stores the hashed value as the users digital signature.
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