DP is a well-described solution to a common software problem. Its benefits: Already defined to solve a problem. Increase code reusability and robustness. Faster devlopment and new developers in team can understand it easily DP defined in to 3 categories: Creational - Used to construct objects such that they can be decoupled from their implementing system. Structural - Used to form large object structures between many disparate objects Behavioral - Used to manage algorithms, relationships, and responsibilities between objects. Creational : Factory - Exposes a method for creating objects, allowing sub-classes to control the actual creation process. Consider a scenario as below:- You have an interface or abstract class or a normal class. Computer class There are 2 sub-classes of of Computer. PC class and Server class Now you have a factory which provides you Computers. And you can give specification to factory whether you want a PC or Server. Below