Click here to Skip to main content
15,912,665 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I got confused whether they comes under abstraction or encapsulation.In some articles they mentioned it comes under encapsulation but in some other under abstraction.
Posted
Updated 10-May-15 19:25pm
v2

This is a question about nothing. The "question" about "what comes under what concept" have nothing to do with computer science. This is pure pseudoscience, or rather, as I called it blah-blahology. There is no such things. Keywords and elements of syntax and semantic don't "come", there are just there and are used in technology; they should not be directly associated with particular concepts. Such approach is anti-scientific, or, more exactly, it indicates simulation of the language of science. And this is a very crude simulation.

Please see:
http://en.wikipedia.org/wiki/Pseudoscience[^],
http://en.wikipedia.org/wiki/Imitation_of_sounds_in_shamanism[^].

Such "questions" should simply not be answered, and imitation of understanding with through using "right words" should not be taught. And students taught this way should use critical thinking and not allow brain-washing them. On this topic, please see my last 1st of April article: Some Programming Approaches to "Neuro-Linguistic Programming"[^].

—SA
 
Share this answer
 
Comments
chandra sekhar 11-May-15 13:48pm    
I don't know why this question is nothing.In many articles we can see people explaining these access specifiers comes under encapsulation and some under abstraction.
Sergey Alexandrovich Kryukov 11-May-15 14:12pm    
I know. :-) Using the words "under encapsulation" could be correct, but it does not make the question valid.
You don't understand very elementary logic, so I'm am not sure you can understand any explanation at all.

But I'll try. Apparently, a method parameter is a device of abstraction. (Isn't it obvious? Do I need to explain why?) And some say "the values passed through actual parameters are placed in the stack frame of execution stack, which is absolutely correct. Following your logic, you could ask: "I'm confused: do method parameter come under abstraction or under stack?" Do you understand that the "logic" itself is ridiculous? The whole way of "thinking" means no thinking, just playing with the words. There is not "come", there is not "under", and there is no "or". It's not "or". It can be "both". Or "none", or anything. And this is not related to your correct or incorrect language usage. This is not related to language at all. It is related to lack of thinking.

Words themselves don't mean anything. You seem not to understand this very basic thing.

—SA
Access specifiers come, of course, as encapusation mechanism. Abstraction is a more general concept, supported by the OOP as a whole.
 
Share this answer
 
It comes under the both concepts Encapsulation and Abstraction

Encapsulation is to hide the member or variable to outside class, so we use access specifiers to hide.
for eg: private

Abstraction is to show and share some common information to the user. so we use acess specifiers to show

for eg: Public
 
Share this answer
 
Comments
chandra sekhar 11-May-15 1:41am    
So all these public,private,protected,protected internal comes under different concepts?
King Fisher 11-May-15 1:57am    
i didn't mean that, access specifier comes under these two concepts.
Sergey Alexandrovich Kryukov 11-May-15 3:27am    
This is very sad that you caught the bait and took this pseudo-question seriously.
Please see my answer where I explain what I mean...
—SA
chandra sekhar 11-May-15 13:50pm    
I was asked this question in an interview and I said they comes under abstraction, so he started arguing that's why I asked here.
Sergey Alexandrovich Kryukov 11-May-15 14:17pm    
How cares what some idiotic interviewers could tell you? And it's possible that they were not idiots, but you just did not understand them, exactly the same way you did not understand my answer. They could argue with you because you first were talking in the same way you talk in your question.

Your problem is talking instead of thinking, lack of thinking. Sorry. You would never get anything good trying to change "incorrect" words with "correct", or anything like that. The whole idea of talking in terms "this or that" is wrong. Those primitive word construct cannot replace understanding the topic, which you quite apparently lack. Talking is useless unless you understand how things work.

—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900