Welcome to my Proxy Design Pattern Tutorial! The Proxy design pattern limits access to just the methods you want made accessible in another class.

It can be used for security reasons, because an Object is intensive to create, or is accessed from a remote location. You can think of it as a gate keeper that blocks access to another Object. I demonstrate how the proxy pattern works using some code used in my State Design Pattern Tutorial. You may want to check that tutorial out before proceeding.

If you like videos like this, it helps to tell Google by clicking here

The code you provided here is incomplete. There are a lot of staff missing here, including some classes from your “State Design Pattern” code, where some classes should be refactored to suit “Proxy Design Pattern” needs.
Thanks

I have seen almost all of your videos about design patterns. This help me a lot in polishing my java skills. And yes Of’cousre You have the Most innovative method of teaching. God Bless You. Keep Rocking !!

Yes you are correct. I dramatically simplified the ATM part here. I’m assuming that it would actually be connected to a database and that the ATM object would just provide already created and stored data. I should have made it clear in the tutorial that I wasn’t fully developing the ATM because I thought that would distract from the pattern. Sorry about that