![]() ![]() Returns a one-line description of the account as a string. Returns the current balance of the account. Adds interest to the account and returns the new balance. (acctNumber + " " + fmt.format(amount)) If (amount < 0) // deposit value is negative ![]() What should I put here to deposit the amount into another account? Public double transfer (double amount, double fee) If (amount balance) // withdraw value exceeds balance Validates the transaction, then deposits the specified amount Public Account (String owner, long account, double initial) Sets up the account by defining its owner, account number, Private final double RATE = 0.035 // interest rate of 3.5% Private NumberFormat fmt = NumberFormat.getCurrencyInstance() Here is my code for the transfer method so far: import ![]() I already know how to withdraw and deposit, I just don't know how to transfer money from one account to another account. My assignment wants me to make a method that will withdraw money from one account and deposit that money into another account. I am working on the class part of the the assignment where you declare all the methods for the driver. I am working on a bank account class that can deposit and withdraw money from bank account balances. Change the main method of Banking class to show this new service. Think of this as withdrawing money from one account and depositing it into another. Change the Account class so that funds can be moved form one account to another. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |