This is a mirror of official site: http://jasper-net.blogspot.com/

Object Oriented Programming Concepts – Interview Questions

| Monday, February 28, 2011
These Questions are common to C++, C#, Java Interviews. Questions are related to software design

1. What is Loosely Coupling in Object Oriented Programming or Software Design?
System should have as many dependencies as is needed to do their job - and the dependencies should be few.

2. What is the advantage of Loosely Coupling?
Loose Coupling helps in reusability, easier maintainability, and allows providing "mock" objects in expensive services as opposed to creating new objects.


3. What is a Concrete Object?
A concrete object is any object created with the keyword new.

4. What is Dependency Injection (DI) in Object Oriented Programming (OOP)?
This is also known as “Inversion of Control" (IoC). It refers to the process of supplying an external dependency in order to reduce more dependencies to a software component. This is implemented to achieve loosely coupling. Object's dependencies should be on interfaces but not on concrete objects.

5. What are the term SOLID stands in OOPs? Explain about it?
SOLID stands for Single Responsibility Open Closed Liskov Substitution Interface Segregation Dependency Inversion .
SOLID Principles of Object-Oriented Design, as introduced by Robert C Martin.
Single Responsibility Principle
A class (or method) should only have one reason to change.
Open Closed Principle
Extending a class shouldn't require modification of that class.
Liskov Substitution Principle
Derived classes must be substitutable for their base classes.
Interface Segregation Principle
Make fine grained interfaces that are client specific.
Dependency Inversion Principle
Program to the interface, not the implementation.

6. What is Single Responsibility Principle of a class?
There should never be more than one reason for a class to change. The classes should exist for one purpose only.


7. What are open closed principles of class?

Read more: Beyond Relational

Posted via email from Jasper-net

0 comments: