Well... no, because you haven't got member variables named "type" or "amount". You've got a "currentBalance", however, which I suspect is what "amount" is intended to be. I think you need to take a step back and look at things. Where are you getting the idea to call these nonexistent methods from, anyway?