structural patterns sometimes instead of starting from scratchyou need to build larger structures by using an existing set of classes that' where structural class patterns use inheritance to build new structure structural object patterns use compositionaggregation to obtain new functionality adapterbridgecompositedecoratorfacadeflyweight and proxy are structural patterns they offers best ways to organize class hierarchy behavioral patterns behavioral patterns offers best ways of handling communication between objects patterns comes under this categories arevisitorchain of responsibilitycommandinterpreteriteratormediatormementoobserverstatestrategy and template method are behavioral patterns because they represent the behavior of systemthey are used generally to describe the functionality of software systems commonly used design patterns singleton it is one of the most controversial and famous of all design patterns it is used in overly object-oriented languagesand is vital part of traditional object-oriented programming the singleton pattern is used forwhen logging needs to be implemented the logger instance is shared by all the components of the system the configuration files is using this because cache of information needs to be maintained and shared by all the various components in the system managing connection to database here is the uml diagramsingleton single +instancestatic +get_instance(static class logger(object)def __new__(cls*args**kwargs)if not hasattr(cls'_logger')