GeekInterview.com
Answered Questions

What is transient variable

Asked By: krishna | Asked On: Sep 7th, 2006

Answered by: Srilatha on: Dec 5th, 2006

When an instance variable is declared as transient, then its value need not persistwhen an object is stored.

Answered by: srinivasaraobora on: Oct 11th, 2006

Hi,This is srinivas from geektalk.When we need not to be serialized an object then we go for object to be declared as transient. this is the real time situation we need to use transient.when we use DT...

Can we create a object of base class?..If we can not create a object of base class then why we need abstract class?

Asked By: abhishek | Asked On: May 21st, 2006

Answered by: VCCoder on: Aug 6th, 2008

Abstract class is class having atleast one pure virtual function.

Answered by: ABYSS on: Oct 12th, 2006

Yes, we can create an object of the Base class.

If we make a class as abstract then we can't create an object of that class.

we can create only pointer of that class this is because to provide one interface to access and so that runtime time polymorphism can implement.

1.Why do we need encapsulation?2. What is a class in C++ analogous to in C

Asked By: harsha | Asked On: Nov 5th, 2005

Answered by: RAJEEV16706 on: Sep 8th, 2006

WELL DESIGNED MODULES ALWAYS HIDES ALL OF ITS IMPLEMENTAIONS DETAILS. MODULES THEN COMMUNICATE WITH EACH OTHER ONLY THROUGH API's UNKNOW TO EACH OTHER INNER IMPLEMENTATIONSPROPER USE OF ACCESS MODIFIE...

Answered by: Raja Muthusamy on: Jun 16th, 2006

In order to bind the data and functions working on it and to safegaurd our data and funtcions from outside access (access from the other objects) we need Encaptulations.

What is the difference between encapsulation and datahiding.Explain with example

Asked By: ramaprasad | Asked On: Nov 2nd, 2005

Answered by: prabhjot kaur on: May 12th, 2012

encapsulation is the wrapping up of data members and data functions into a single unit like classes. here we can control the visibility of data with the help of access specifiers i.e. public,private and protected.
in data hiding data is totally private we cannot access the data.

Answered by: shrimanta on: Mar 14th, 2012

encapsulation is the concept of the datamember. Data Hiding is the Access Specifier.

Explain the inheritance principle

Asked By: Interview Candidate | Asked On: Jun 11th, 2005

Inheritance is the process by which one object acquires the properties of another object.

Answered by: goksn on: Sep 9th, 2009

Inheritance is one of the important principles of OOP.Inheritance is the process by which one object acquires the properties of another object.By use of Inheritance , an object need only define those ...

Answered by: jdoe123 on: Aug 6th, 2007

Inheritance involves building upon an existing class so that additional or more-specialised functionality is added.
A key design aspect of inheritance is that it is used in a manner which is understandable and supported by a clear, justifiable relationship.

Explain the encapsulation principle

Asked By: Interview Candidate | Asked On: Aug 4th, 2005

Encapsulation is a process of binding or wrapping the data and the codes that operates on the data into a single entity. This keeps the data safe from outside interface and misuse. One way to think about encapsulation is as a protective wrapper that prevents code and data from being arbitrarily accessed...

Answered by: srinathbairu on: Jun 24th, 2010

Every program deals with two elements:
1) Data 
2) Code [function]
Combining these two elements into a single unit is known as Encapsulation (Binding).

Answered by: dkapadia on: Sep 4th, 2008

Encapsulation with a simple example would be .Automatic Transmission on an automobile. It encapsulates 100's of bits of information about your engine, such as how much are accelerating, the pitch ...

Describe the principles of OOPS

Asked By: Interview Candidate | Asked On: Aug 4th, 2005

There are three main principals of OOPS which are called polymorphism, inheritance and encapsulation

Answered by: nkumar1095 on: Oct 8th, 2009

Abstraction: Involves extracting only the relevant information.Encapsulation: Involves packaging one or more components together.Inheritance: Is a process of creating a new class by adding some featur...

Answered by: snvgram on: Jan 9th, 2009

The four basic principle of OOP are:AbstractionEncapsulationHierarchyand ModularityPlease note that there are many other object oriented principles, but the above the are basic ones.We can refer Class...

Interview Question

 Ask Interview Question?

 

Career Counselling

 Have Career Question?

 Ask Chandra

 Ask Only Career questions.

Follow us: