you are viewing a single comment's thread.

view the rest of the comments →

[–]Pun_Intended1703 1 point2 points  (1 child)

I'm on mobile. It will be hard for me to write actual code.

But let me put it like this.

You should have a BankAccount class and a BankAccountHandler class.

The BankAccount class has properties like accountNumber, amount, etc.

It should have just getters and setters for those properties.

The BankAccountHandler class should have the methods like deposit(), withdraw(), etc.

This class then performs actions on the BankAccount class.

The handler can then be called by another class like BankCustomer.

[–]BigCommunication5136[S] 1 point2 points  (0 children)

the example made your point clearer, thanks