| Design a class for a bank database. The database should support the following operations: -
depositing a certain amount into an account -
withdrawing a certain amount from an account -
looking up the current amount (i.e. the balance) in an account -
transferring an amount from one account to another The amount in the transactions is a value of type long . The accounts are identified by instances of the class Account that resides in a package called com.megabankcorp. records . The database object should reside in a package called com.megabankcorp. system . The depositing, withdrawing, and balancing operations should not have any implementation, but allow subclasses to provide the implementation. The transferring operation should use the depositing and withdrawing operations to implement the transfer. It should not be possible to alter this operation in any subclass, and only classes within the package com.megabankcorp.system should be allowed to use this operation. The depositing and withdrawing operations should be available from anywhere . The balancing operation should only be available from subclasses and classes within the package com.megabankcorp.system . |