抽象和封装之间的差异? [英] diff between abstraction and encapsulation?

查看:67
本文介绍了抽象和封装之间的差异?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hii朋友



i想知道抽象和封装之间的主要区别......



编辑:添加了家庭作业标签,因为这个问题是大学讲师想要吓唬学生的最爱

推荐答案

抽象就像去采访:你知道一般程序,并且你会被问到问题。但是你不知道谁会问这些问题以及结果会是什么。



封装就是当面试官问你一个问题并在他脑海里有答案的时候但是不要放弃它:你不能直接获得答案,但你可以通过提供答案与其进行互动,并让面试官判断它是否与他预期的答案相符。



忘了它 - 我现在才意识到这个问题多大了......: - / [/ edit]
Abstraction is like going to interviews: you know the general procedure, and that you're going to be asked questions. But you don't know who will ask the questions and what the results will be.

Encapsulation is when an interviewer asks you a question and has the answer in his head, but doesn't give it away: you can't access the answer directly, but you can interact with it by providing an answer and have the interviewer judge whether it matches his expected answer or not.

[edit]just forget it - I only now realized how old that question was .... :-/ [/edit]


你可能会非常很惊讶地发现你不是第一个提出这个问题的人。



我只是用Google搜索差异抽象封装我得到了600,000以上命中。前四页都是人们都在问这个问题,在这一点上我感到无聊,所以可能会有更多。



自己动手去关注任何问题回答者指出的参考资料。



你真的应该在问这里之前做到这一点,你知道。
You might be very surprised to find that you are not the first person to ask this question.

I just googled for difference abstraction encapsulation and I got over 600,000 hits. The first four pages were all people asking this very question, at which point I got bored, so there could have been more.

Have a go for yourself and follow any reference material pointed to by the answerers.

You really should have done this before asking here, you know.


你有吗?考虑使用谷歌,阅读教科书或向老师寻求家庭作业的帮助?



这里 [ ^ ]。
Did you consider using google, reading your textbooks or asking your teacher for help with your homework ?

Here[^].


这篇关于抽象和封装之间的差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆