Question: in python Problem 2: Bank accounts Design a class BankAcount BankAccount should have the following components: Account Number -Balance BankAccount should have the following functionalities
in python
Problem 2: Bank accounts Design a class BankAcount BankAccount should have the following components: Account Number -Balance BankAccount should have the following functionalities - Deposit Withdraw Show balance (Represent the bank account in the form of a string) Example Interaction: >>> my_account -BankAccount( BOA123', 1000) >>> print (my_account) Current balance is: $1000 my_account.deposit(100) >>> print (my_account) Current balance is: $1100 my account.withdraw(58e) >>> print (my_account) Current balance is: $600 >>> my_account.withdraw(999999) Insufficient balance. The current balance remained as $600
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
