posted 9 years ago
Basically this is the assignment:
Modify the Account class to provide a service that allows funds to be transferred from one account to another.
Note that a transfer can be thought of as withdrawing money from one account and depositing to another (for full credit, have your transfer method invoke the withdraw and deposit methods appropriately).
Modify the main method of the Transactions class to demonstrate this new service.
Here's a prototype / header for the new transfer method of the Account class:
public void transfer (Account acctToWithdrawFrom, double amountToTransfer, double fee)
// NB: The fee is charged to the account from which the amount is withdrawn.
i've add
to the driver class/ transactions
and
public void transfer (Account acctToWithdrawFrom, double amountToTransfer, double fee)
{
this.withdraw (amountToTransfer, fee);
this.deposit (amountToTransfer);
}
to the blueprint class (accounts)
clearly it's wrong but an someone help me? Thanks in advance
Account class