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

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!