skip to main |
skip to sidebar
1. Polymorphism
2. Inheritance
3. Encapsulation
www.codecollege.NET
The Main Types of Design Patterns are:
Design Patterns are generally classified into three categories, they are:
1. Creational
2. Structural
3. Behavioral
www.codecollege.NET
They deal with object creation. They provide you the best way to create objects based on the current situation.
Example:
Singleton, Factory method, Abstract factory, Builder
www.codecollege.NET
Structural
They deal with relationship between entities. They provide you the best way to relate entities on various scenarios.
Example:
Adapter, Aggregate, Bridge
www.codecollege.NET
Behavioral
They deal with communication between objects. They provide you the best way to communicate between objects.
Example:
Chain of responsibility, Command, Interpreter
www.codecollege.NET
They deal with multi-threaded programs. They provide solutions for multi-thread design problems.
Example:
Balking, Double checked locking, guarded suspension
www.codecollege.NET
Class:
It defines characteristics of a thing and its behavior. It is blueprint based on which objects are created.
Example: Employee (which will have all the details about the employee like name, id, salary, etc and the methods which describes his behavior like calcSalary(),displaydetails(),etc.
www.codecollege.NET