Sunday, September 23, 2007

Intrawa Tips


Interview Tips
OOPS CONCEPT
1. What is Object Oriented Programming ?

It is a problem solving technique to develop software systems.It’s a technique to think real world in terms of objects.Object maps the software model to real world concept.These objects have responsibilities and provide services to application or other objects.

2.What’s a Class ?

A class describes all the attributes of objects , as well as the methods that implement the behavior of member objects.Its a comprehensive data type which represent a blue print of objects.It’s a template of object.

3.What’s a Object ?

It’s a basic unit of a system.An object is an entity that has attributes, behavior, and identity. Objects are members of a class.Attributes and behavior of an object are defined by the class definition.

4. What’s the relation between Classes and Objects ?

They look very much same but are not same.Class is a definition , while object is a instance of the class created.Class is a blue print while objects are actual objects existing in real world.Example we have class CAR which has attributes and methods like
5.
5. What is difference between abstract classes and
interfaces?

Following are the differences between abstract and interfaces :-
v Abstract classes can have concrete methods while interfaces have no methodsimplemented.v Interfaces do not come in inheriting chain , while abstract classes come ininheritance.

6. What’s difference between delegate and events?

Actually events use delegates in bottom. But they add an extra layer on the
delegates, thus forming the publisher and subscriber model. As delegates are function to pointers they can move across any clients. So any of the clients can add or remove events , which can be pretty confusing. But events give the extra protection by adding the layer and making it a publisher and subscriber model.

7. What’s the difference between Class and
structure’s ?

Following are the key differences between them :-
Structure are value types and classes are reference types.So structures use
stack and classes use heap. Structures members can not be declared as protected , but class members canbe.
You can not do inheritance in structures.Structures do not require constructors while classes require.
Objects created from classes are terminated using Garbagecollector.Structuresare not destroyed using GC.

No comments: