Question: void DoDeposit( Account account ) Performs a deposit operation on the specified account. The method requests for the amount that the user wants to deposit,

void DoDeposit( Account account ) Performs a deposit operation on the specified account. The method requests for the amount that the user wants to deposit, then forwards the request to the account. void DoWithdraw( Account account ) Performs a withdraw operation on the specified account. The method requests for the amount that the user wants to withdraw, then forwards the request to the account. void DoPrint( Account account ) Calls Print on the specified account. The following UML diagram should help you to understand the design of the current version of the banking system. BankSystem menume MenuOption Deposit . Withdraw * Main( ) you'd *Print * Beaduserdoout( ) MenuOption Quit * DoWithdraw( account: Account }: vod * DoDeposit/ account Account ): vold Printf account Account 1: vold Account _balance: decimal . name: String +property. Name: String (read-only) *Account( name: String, balance: decimal ) *Deposit( amount decimal ): boolean *Withdraw( amount: decimal ): boolean *Print( ): void Note that in DoDeposit / DoWithdraw you may need to use a decimal local variable to store the amount to deposit or withdraw, before you pass it to the Account object to process. Use the Boolean value (bool data type in C#) returned by the Withdraw or Deposit method to let the user know if the call was successful. 4. Complete and test your program for potential logical issues and runtime errors. 5. Prepare to discuss the following with your tutor: Explain how selection is used within the Accounts and for the menu. Why should we use an enumeration for the menu? What are the advantages and other approaches? - How is repetition used in the program? What capabilities does this give us? How can control flow help increase the capability of our objects
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
