Monday, December 5, 2011

5 OOAD principles


1) Open Close Principle (OCP): It states that a class/module/package should be open for extension and close for modification.
2) Dependency Inversion Principle (DIP): It states that classes should not depend on concrete classes instead they should depend on abstract classes.
3) Interface Segregation Principle (ISP): It states that a class should not be needed to implement any part of any interface which it’s not going to use.
4) Singe Responsibility Principle (SRP): It states that a class should have only one responsibility.
5) Liskov’s Substitution Principle (LSP):It states that  a class a derived class should be able to completely replace base class without changing their behavior.

No comments:

Post a Comment