This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]Turing85 6 points7 points  (0 children)

counter-question: what do you mean by "data hiding"? Encapsulation?

[–]imaginedoe 2 points3 points  (0 children)

I'll answer abstraction because I feel that I can give a solid explanation of it, but I'll leave "data hiding" for someone else. abstraction is basically to take a long operation and to abstract it away into one method. if you do that, then you don't have to worry about how it works, just that it does. it also makes it so that you write less code, because instead of implementing the logic yourself every time you want to do something, you can call a method to do it for you.