OOPS概念,特征&基本面 [英] OOPS Concepts, Features & Fundamentals

查看:99
本文介绍了OOPS概念,特征&基本面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习oops概念并在下面的网站上找到一些内容。



OOPS概念,功能&基础知识



http://www.aspneto.com/oop-concepts-object-oriented-programming-concepts-with-examples.html [ OOPS Concepts,Features&基础知识]



与以上链接提供的以下信息完全混淆。



I am learning oops concepts and find some content on below site.

OOPS Concepts, Features & Fundamentals

http://www.aspneto.com/oop-concepts-object-oriented-programming-concepts-with-examples.html[OOPS Concepts, Features & Fundamentals]

and completely confused with below information provided by the above link.

Note: Abstraction and Encapsulation are related features in object oriented programming. Abstraction allows making relevant information visible and Encapsulation enables a programmer to implement the desired level of abstraction. That means hidden part of class acts like Encapsulation and exposed part of class acts like Abstraction. 





似乎有一个玻璃杯,当有两个人看到这个玻璃杯时,玻璃杯是一半完全和第二个说玻璃是半空的。



请帮助我关于这个封装和抽象和数据隐藏我也读过其他博客但是没找到什么当我阅读更多内容时,它让我更加困惑。请帮助我理解c#中的这些概念。



提前谢谢,请帮帮我,我需要它。



it seems like that there is one glass and which is half filled with water when two person see this glass one say the glass is half full and second one says that the glass is half empty.

Please help me regarding this encapsulation and abstraction and data hiding i have read others blogs also but did not find something valuable it is getting me in more confusion as i read more . Please help me two understand these concepts in terms of c# .

Thank you in advance , please help me i deadly need it.

推荐答案

请看我对这个问题的评论。



是的,我已经试着向你解释说阅读简短的定义只会读单词。但是在下一步中,我浏览了你引用的文章,发现情况要糟糕得多。问题是:这篇文章并不严肃,坦率地说,这完全是垃圾,特别是抽象的解释。很明显,作者本人对这些概念几乎一无所知。我很少看到比抽象和封装是相关的功能......更多的胡言乱语。引用。



以及采访问题链接的事实(众所周知无用和误导主题)在文章中引用,讲述了故事。停止阅读垃圾文章,你会更加困惑。



你可以找到更可靠的概念解释来源(但是,跳到最后,这不是你必须使用的主要设备)。在谈论编程中的抽象之前,你必须至少对这个术语的最常见理解有所了解: https:// en。 wikipedia.org/wiki/Abstraction [ ^ ]。



它真的可以帮助你理解编程中的内容。实际上,编程都是关于抽象的。请参阅: https://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 [< a href =https://en.wikipedia.org/wiki/Abstraction_%28computer_science%29target =_ blanktitle =New Window> ^ ]。



注意这个解释和你引用的文章中的解释之间的显着差异。同样,您可以阅读封装: https://en.wikipedia.org/wiki/Encapsulation_%28computer_programming%29 [ ^ ]。



现在让我回到我的主要观点。 只读定义和一般解释将毫无用处。要学习这些抽象的和非常重要的基本概念,你必须学习计算机科学,实践编程本身和编程技术作为一种人类活动通过学习过程,您可以了解这些基本概念是如何运作的。学习这些概念的另一个问题是:学习它们而不学习其他一些基本概念也是无用的。你真的需要全面了解编程,只能通过努力和迭代学习过程,而不是一次性。



读什么?我很害怕你。有很多文献,但同时,还有很多流行的误解,这些误解在各种出版物中也有广泛的代表。这可能非常令人困惑。我想给你一个例子。有一种流行的教学方法声称存在四个OOP支柱:抽象,封装,继承和多态,并且这种声明通常后面是每个的解释。这只不过是一个大美丽的谎言,但是当作者相信它时,这就是谎言。这种方法至少可以适得其反,因为1)这些概念具有不同的非匹配水平,2)一个概念代表作为另一个概念的先决条件,例如,不可能谈论OOP没有继承的多态性。等等......在这里,再一次,学习计算机科学的主体可以帮助你发展对这个概念的批判性思考。这种思考的先决条件是对事情如何运作的第一手理解。



-SA
Please see my comment to the question.

Yes, I already tried to explain you that reading short definitions would be reading just words. But on next step I looked through the article you referenced and found that the situation is much worse. The problem is: this article is nothing serious, frankly, this is total trash, especially the "explanation" of "abstraction". It's pretty apparent that the author himself is pretty much clueless about those concepts. I rarely saw more of gibberish than that "Abstraction and Encapsulation are related features…" quote.

And the fact that the "Interview questions" links (notoriously useless and misleading topic) are referenced in the article, tells the tale. Stop reading trash articles, and you will be much less confused.

You can find a lot more reliable source of explanation of the concepts (but, jumping to the conclusion, this is not the main device you have to use). Before talking about abstraction in programming, you have to get at least general understanding of the most common understanding if this term: https://en.wikipedia.org/wiki/Abstraction[^].

It can really help you to understand what is that in programming. In fact, the programming is all about abstractions. Please see: https://en.wikipedia.org/wiki/Abstraction_%28computer_science%29[^].

Pay attention for the striking difference between this explanation and the "explanation" you found in the article you referenced. Likewise, you can read on encapsulation: https://en.wikipedia.org/wiki/Encapsulation_%28computer_programming%29[^].

And now let me return to my main point. Reading just the definitions and general explanations will be majorly useless. To learn these abstract and very important fundamental concepts, you have to learn computer science, practical programming itself and programming technology as a kind of human activity. Through the process of learning, you can learn how these fundamental concepts really work. Another problem with learning these concepts is: learning them without learning a number of other fundamental concepts would also be useless. You really need holistic understanding of programming, which can only come with effort and iterative learning process, not at once.

What to read? I'm afraid to confuse you. There is a lot of literature, but, at the same time, there is a lot of popular misconceptions which are also widely represented in various publications. This can be very confusing. I want to give you just one example. There is a popular didactic approach claiming that there are four OOP "pillars": abstraction, encapsulation, inheritance and polymorphism, and such claim is usually followed by the "explanation" of each. This is nothing but a big "beautiful" lie, but the lie of that kind when the author believes in it. This approach is, to say the least, counter-productive, because 1) these concepts are of different non-matching levels, 2) one concept represents the feature serving as the prerequisite for another one, for example, it's impossible to talk about OOP polymorphism without inheritance. And so on… Here, again, learning the body of computer science can help you to develop critical thinking on the concept. The prerequisite for such thinking is first-hand understanding of how things work.

—SA


这篇关于OOPS概念,特征&amp;基本面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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