1) Singleton - example utlity class
2) Facade - A simple and easy-to-understand example of the Facade pattern is a Computer System. When you press the power button on your computer, several subsystems (like the CPU, Memory, Hard Drive) need to work together to start the computer. Instead of interacting with these subsystems individually, you interact with a single, unified interface—the power button.
3) Strategy pattern - Strategy pattern is a perfect example of runtime polymorphism, where different behaviors (strategies) can be swapped in and out dynamically, depending on the situation.
Factory Pattern - create interface and implements interface
No comments:
Post a Comment