New World Systems

Interview Question

Software Developer Interview

Give examples of Object oriented design principles


Interview Answer

1 Answer


- single responsibility
- open closed principle (classes should open to extension, closed to modification)

Good example of OCP is dependency injection (such as Command Pattern). DRY is a byproduct of following OOD principles. That which you inject via the Command Pattern is likely to follow the Single Responsibility Principle.

ryan baldwin on May 24, 2011

Add Answers or Comments

To comment on this, Sign In or Sign Up.