Design a transaction class for deposits/withdrawals | Capital One Interview Question