• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

OOP Concepts

 
Ranch Hand
Posts: 338
Scala Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello friends,
i am pretty much confused between all the oop terms.it's my humble request to explain and make my oop concepts clear.

1.What is difference between encapsulation,abstraction,data hiding,data binding??

I have OOP test tommorrow.
I am requesting all of you to please answer the following questions:-

If the question comes like this
2.The design of classes in the way that hides the details of implementation details from the user is:-
1.Encapsulation
2.Information Hiding
3.Data Abstraction
4.All of the above.
then what should be the answer??

The Object Oriented Technology's __________ Concept means that a small change in users's requirement should not require large changes to be made to the system:-
1.Abstraction
2.Modularity
3.Encapsulation
4.Modeling.
 
Marshal
Posts: 80093
413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good luck with the test, but Do Your Own Homework. You will remember far better if you suggest your answers and we'll see whether we agree.
 
Pankaj Shet
Ranch Hand
Posts: 338
Scala Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my answer to the 2 above questions will be
1.Encapsulation first question

but i have read a clear statement that Encapsulation implies Information Hiding,so i m still confused.

and

2.Abstraction for the second question.

but then again i have read a clear statement that Abstaction hides the non essential data from the user.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pankaj, if you copy a question from a book, website or other source, we require that you quote your sources.

So, please tell us where you got this question from.
 
Pankaj Shet
Ranch Hand
Posts: 338
Scala Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have these question in a Question Bank given by our College proffessors..
i have it on my desktop.. i can't even copy the whole Question Bank for the security reasons.
and as far as the anwers are concerned, these same questions have different answers in my qustion bank..
same dito question is asked at 3 different places with 3 different answers,when asked to them about the same, they also get confused and make me confused.

but still i can give the link where this question is asked..
some of such confusing questions

it consits of C,C++,and OOPs Concepts,this question is asked here..:-
refer to Q29,Q39
[URL]http://examblast.com/c-multiple-choice-question/index.html[URL]

there are total 39 questions of which such confusing questions have been left unanswered.

i tried to solve all these 39 questions, but was unable to solve some of such questions.

I will be really thankful if i get these doubts solved..

and if i get to know the difference between:
Abstraction,Encapsulation,Data Hiding and Data Binding


-thanks a lot
 
Pankaj Shet
Ranch Hand
Posts: 338
Scala Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sir,
There ten questions on which i have doubts.
Those questions and my answers are given ahead.
please give me the right solution for the same.
According to me the answers are :-

Data Hiding: Data Hiding the Hiding data(instavce variables) and making them private and accessible through only methods

Encapsulation: Encapsulation refers to the bundling of data with the methods that operate on that data (Logically same as Data Hiding)

Abstraction : Data Abstraction the hiding implemetation details from outside environment

Data Binding : Data Binding is used in XMLs. data binding refers to the process of representing the information in an XML document as an object in computer memory




1.The design of classes in the way that hides the details of implementation details from the user is:-
1.Encapsulation
2.Information Hiding (Answer)
3.Data Abstraction
4.All of the above.


But then Encapsulation implies information hiding??
according to answer 6, it should be Encapsulation as well as Info hiding??
What if i have to select one of them??

2.The Object Oriented Technology's __________ Concept means that a small change in users's requirement should not require large changes to be made to the system:-

1.Abstraction (Answer)
2.Modularity
3.Encapsulation
4.Modeling.
According to me this concept is of low coupling or modelling??

3.The Abilitity to reuse objects already defined ,perhaps for a different purpose with modification appropriate to the new purpose is
referred to as ___________:-
1.Information Hiding
2.Inheritance (Answer)
3.Redefination
4.Overloading


4.___________ means that both data and methods which may access it are defined together in the same unit:-
1.Data Hiding
2.Encapsulation (Answer)
3.Data Binding
4.none of the above

5.The term given to the process of hiding all details of an object that do not contribute to its essential characteristics is called ________:-
1.Data Hiding (Answer)
2.Packaging
3.Encapsulation
4.Grouping

6.Encapsulation is:-
1.Information hiding
2.Data binding
3.Both (Answer)
4.None

But then for 4 question, answer should be all the three??

7.The Object Oriented technology's use of_______ facilitates the reuse of code and architecture and its _______ feature provides system with stability as a small change in requirements does not require massive change in systems:-
1.encapsulation,inheritance
2.inheritance,polymorphism (Answer)
3.inheritance,encapsulation
4.polymorphism,abstraction

According to Q3 and Q2, the respective answers to both the blanks should be inheritance and abstraction??

8.OOP allows for extension of object function or class function,this ability within OOP is called __________:-
1.Extensibility (Answer)
2.Expansion capacity
3.Virtual Expansion
4.Scalability


9.The ability to send a common message to different classes and for each subclass object to respond to the message in a manner appropriate to it's own properties is called __________:-
1.Adaptability
2.Expansion Capacity
3.Virtual Extension (Answer)
4.Scalability.

10.An ___________ denotes Essential Characteristics of objects that distinguishes it from all other kinds of Objects.:-
1.Aggregation.
2.Abstraction. (Answer)
3.Modularity.
4.None of the above.




Thanks a Lot,
-Pankaj Shet.
[ June 19, 2008: Message edited by: Campbell Ritchie ]
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I must say interesting questions your college prof gave. Anyway in my view OOP concepts are really encapsulation, abstraction, inheritance, and polymorphism. If you have some OOP practice that you should able to define these 4 terms fairly easy.

As for how say data/info hiding, is it same as encapsulation/abstraction it depends. As long as you use the "private" keyword in declaring "instance variables" (inside class outside methods) I personally consider that I have encapsulate the data (eg data hiding). If I add an interface file declaring all the methods then a class implements that interface then its abstraction and encapsulation.

Another way to look at abstraction is abstract classes similar to interfaces but need to extends it and make all abstract methods concrete ... hence inheritance (also mean subclassing). And finally polymorphism is many forms of one thing/object eg a set can be created as TreeSet or HashSet. So polymorphism can be considered as reuse.

Hope this clears some concepts for you
 
Campbell Ritchie
Marshal
Posts: 80093
413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think those are simple questions about learning nomenclature; it is probably worthwhile going to Wikipedia and looking what it says about "encapsulation," "data hiding," etc. For "abstraction" make sure to find the object-oriented bit, because "abstraction" means different things in different contexts.
 
Campbell Ritchie
Marshal
Posts: 80093
413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How did your test go?

BTW: Please use the buttons below the message window rather than writing them by hand. It's quicker, and ensures correct tags. I have corrected your tags, and you can see how much better it looks.
[ June 19, 2008: Message edited by: Campbell Ritchie ]
 
Pankaj Shet
Ranch Hand
Posts: 338
Scala Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my test is postponed to 21st june.
it fortunately did not happen.
please clear the confusion sir i went through it but was not able to get the correct answers for the same?
alongwith those questions, i have written the doubts in context with the other questions.
also, i feel the remaining questions under which i did not ask you any doubts,
are correctly answered.
[ June 19, 2008: Message edited by: Pankaj Shet ]
 
Campbell Ritchie
Marshal
Posts: 80093
413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will have to do some revision, I am afraid. If I were teaching, I wouldn't have set those questions, but I'm not . . .

If you set a MCQ like that, you need to make sure that one answer is correct and all the other possible answers are definitely incorrect. I presume those questions are simply revision exercisees to give you a taste of what the exam will be like. You are sure you have copied them correctly?

What you say about no 4 is correct; all 3 are potential answers, but encapsulation seems to me the best answer.

I am reasonably happy with your answers to 3 4 5 8 10, and I don't understand no 9. If that is what your test is going to be like, make sure to go through your books or Wikipedia.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic