New World Systems

www.newworldsystems.com

Interview Question

Software Developer Interview

Give examples of Object oriented design principles

Answer

Interview Answer

1 Answer

0

- DRY
- 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.