Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
7Activity
0 of .
Results for:
No results containing your search query
P. 1
OOPS - Explain OOPs,With Re..

OOPS - Explain OOPs,With Re..

Ratings: (0)|Views: 289|Likes:
Published by austinindia007
oops
oops

More info:

Published by: austinindia007 on Jun 20, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/11/2014

pdf

text

original

 
Sponsored LinksBest Rated Answer
 —
GeekInterview.com
>
Tech FAQs
>
OOPSGo To First
|
Previous Question
|
Next QuestionOOPS | Question 233 of 257Print
 
Explain ,With real world examples
 
Total Answers and Comments:
1Last Update: August 31, 2006 Asked by: kalps
Submitted by
: Linto 
OOPs is Object Oriented Programming.The great thing about OOPs is that is all about classes and objectswhich can easily correlated with real life scenarios.Class is the general thing and object is the specilisation of general thingFor example if Human can be a class and linto ,raj etc are names of persons which can be considered asobject.It supports concepts such as data abstation,inheritence ,polymorhpism etc.Data Abstration is the process of encapsulating data with in object so as to protect data and to avoidunwanted access(You know now the age of information explosion ,so giving proper data has greatersignificance)So for our example every human has eye ,so eyecolor can be considered as the property of humanbeing which can be encapsulted as a data in our class Humanclass Human{private:EyeColor IColor;NAME personname;};Consider object of class of Human myhuman;we want set myhuman's name as "linto" and IColor as "black"For that we want methods to do that task.So need methods for class to do a particular task on the dataclass Human{private:EyeColor IColor;NAME personname;public:void SetName(NAME anyName);void SetIColor(EyeColor eyecolor);};So a class is a thing which has data members(normally properties of object) and methods to manipulatethat data.But the thing to undersand is that class has propeties not any particular data.In other wordsthe Human class no specific IColor.Only when one object of that class (myhuman) has name "linto" andIColor "black".Next we can go through the concept of inheritence which has the same as the word meaning as u allaware.Human|____|_____| |
Sponsored Links
 
Related Categories
 —Abinitio FAQsAJAX FAQsConcepts FAQsData Warehousing FAQsDatabase FAQDataStage FAQInformatica FAQLoadRunner FAQLotus Notes FAQMainframe FAQsNetworking FAQOOPS FAQOperating System FAQOracle FAQsOracle Apps FAQsPeopleSoft FAQsPL/SQL FAQProgramming FaqsQTP FAQRational Robot FAQRDBMS FAQsSAP R/3 FAQsScripting FAQsSiebel FAQSilkTest FAQsOracle SQL FAQSQL Server FAQsTest Director FAQTesting FAQsTesting DefinitionsWebsphere FAQWinRunner FAQ
 
Home
|
Tech FAQ
|
Interview Questions
|
Placement Papers
|
Tech Articles
|
Learn
|
Freelance Projects
|
Online Testing
|
Geeks Talk
|
Job Postings
|
Knowledge Base
|
Site Search
|
Add/Ask Question
OOPs
OOPS - Explain OOPs,With real world exampleshttp://www.geekinterview.com/question_details/331681 of 46/20/2009 11:39 AM
 
Related Questions
/ /Men WomenHere Human is general class and Man and Women are sub classes of general thing.That is Human classcontains all features general and Human and Women contains features specific to their own class.Hey try to write class ...you will get the essence of OOPs. 
 Above answer was rated as good by the following members: 
tanzeem khan
 August 31, 2006 03:30:05
 
#1
 
Linto
 
RE: Explain OOPs,With real world examples
OOPs is Object Oriented Programming.The great thing about OOPs is that is all about classes and objectswhich can easily correlated with real life scenarios.Class is the general thing and object is the specilisation of general thingFor example if Human can be a class and linto raj etc are names of persons which can be considered asobject.It supports concepts such as data abstation inheritence polymorhpism etc.Data Abstration is the process of encapsulating data with in object so as to protect data and to avoidunwanted access(You know now the age of information explosion so giving proper data has greatersignificance)So for our example every human has eye so eyecolor can be considered as the property of human beingwhich can be encapsulted as a data in our class Humanclass Human{private:EyeColor IColor;NAME personname;};Consider object of class of Human myhuman;we want set myhuman's name as linto and IColor as blackFor that we want methods to do that task.So need methods for class to do a particular task on the dataclass Human{private:EyeColor IColor;NAME personname;public:void SetName(NAME anyName);void SetIColor(EyeColor eyecolor);};So a class is a thing which has data members(normally properties of object) and methods to manipulatethat data.But the thing to undersand is that class has propeties not any particular data.In other words theHuman class no specific IColor.Only when one object of that class (myhuman) has name linto and IColorblack .Next we can go through the concept of inheritence which has the same as the word meaning as u allaware.Human| ____|_____| | / /Men WomenHere Human is general class and Man and Women are sub classes of general thing.That is Human classcontains all features general and Human and Women contains features specific to their own class.Hey try to write class ...you will get the essence of OOPs. 
Is this answer useful?
 
 Yes
|
No 1 0
Overall Rating:
 
+1
 
OOPS - Explain OOPs,With real world exampleshttp://www.geekinterview.com/question_details/331682 of 46/20/2009 11:39 AM
 
Explain the need for "Virtual Destructor".
Latest Answer : When classes are inherited, we need to make the base class destructor virtual – to make sure whenthe object is destroyed, all the derived class destructors also called. Otherwise the derived class destructors are notcalled because the there is compile ...
Read Answers (1)Answer Question
 
Subscribe
 
Explain "passing by value", "passing by pointer" and "passing by reference"
Explain "passing by value", "passing by " and "passing by reference"
Read Answers (3)
Tags :
PointerAnswer Question
 
Subscribe
 
Explain working of printf.
Latest Answer : The return type of the printf() function is 'int'. (lot of confusion surrounding the return type of printf -- correct answer is 'int') ...
Read Answers (2)Answer Question
 
Subscribe
 
Give 2 examples of a code optimization.
Latest Answer : I am giving below another example of code optimization you can follow for C++ program. As we allknow prefix operators apply the operations of incrementing or decrementing as specified and the new value is stored.In case of postfix operator the operations ...
Read Answers (2)Answer Question
 
Subscribe
 
Explain one method to process an entire string as one unit?
Latest Answer : there is no way to process an entire string.it has to be done char by char ...
Read Answers (1)Answer Question
 
Subscribe
 
What is polymorphism? Explain with an example.
Latest Answer : is the ability to assume many forms. In short it refers to several methods / operatorssharing the same name but having different parameter list and different implementations. Variables also can bepolymorphic. There are two ways polymorphism ...
Read Answers (1)Answer Question
 
Subscribe
 
I have just started doing OOP design. My experience has been in RDBMS.Where we work with tables, relation
I have just started doing OOP design. My experience has been in RDBMS. Where we work with tables, relationbetween them defined using foreign keys. Can anyone pl. help in designing classes for a simple case here. There aretwo tables (states, districts). Districts contains stateId as foreign key. So state to district 1-many relation is there.Such things how do we design in oops. Thanx in advance
Read Answers (2)
| Asked by : sudhaTags :
RDBMS
,
OOPSAnswer Question
 
Subscribe
 
What are the advantages of oops over traditional programming?
Latest Answer : OOPs is closer to real life representation of the objects which we want to program.Hierarchicalrelationships can be represented using inheriatnce. Data can be divided as public and private -- also we can provideinterface for entering and validating ...
Read Answers (2)
| Asked by : rituTags :
OOPSAnswer Question
 
Subscribe
 
What is the purpose of friend function and is it overwhilmimg the private policyof oops concept?
Latest Answer : A friend function can access all private protected and public data of a class. A class has to declare afunction or another class as a friend. Also the friendship is one way. Class A is friend of class B does not mean thatclass B is friend of class A. ...
Read Answers (1)
| Asked by : vasanthakumarTags :
OOPSAnswer Question
 
Subscribe
 
Can we call constructor of superclass directly without using super()method insubclass? if yes,explain,if 
Can we call constructor of superclass directly without using super()method in subclass? if yes,explain,if no,why?
Read Answers (4)
| Asked by :
lherwadkarAnswer Question
 
Subscribe
 
Sponsored Links
 
Related Articles
 
pointerPolymorphism
OOPS - Explain OOPs,With real world exampleshttp://www.geekinterview.com/question_details/331683 of 46/20/2009 11:39 AM

Activity (7)

You've already reviewed this. Edit your review.
1 hundred reads
sivakugai liked this
Ravi Indran liked this
Rajesh Chandran liked this
simran_adip liked this
Sachin Dev liked this
manjur_a liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->