什么是面向对象编程中的多态? [英] what is polymorphism in object oriented programming?

查看:232
本文介绍了什么是面向对象编程中的多态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请回答这个问题。

推荐答案

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



尝试从这里开始:

http://en.wikipedia .org / wiki / Polymorphism_%28computer_science%29 [ ^ ],

http://en.wikipedia.org/wiki/Polymorphism_in_object -oriented_programming [ ^ ],
http://www.cplusplus.com/doc/tutorial/polymorphism/ [< a href =http://www.cplusplus.com/doc/tutorial/polymorphism/target =_ blanktitle =New Window> ^ ]。



它很难解释为什么我觉得你正在做的事情是错误的。你不能只问什么是多态?,什么是继承?等,并以这种方式学习。它没有这种方式。你必须系统地一起学习。如果你试着在这里学习,那就是你不会抓住事物的本质。



拿一本书,从头到尾阅读,有很多关注,随时解决练习。一起学习概念,概念和技巧。



-SA
Please see my comment to the question.

Try to start here:
http://en.wikipedia.org/wiki/Polymorphism_%28computer_science%29[^],
http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming[^],
http://www.cplusplus.com/doc/tutorial/polymorphism/[^].

It's hard to explain why do I feel you are doing something wrong. You cannot just ask "what is polymorphism?", "what is inheritance?", etc., and learn something this way. It does not work this way. You have to learn all together, systematically. If you try to learn this here, that there, you won't catch the essence of thing.

Take a book, and read it from the beginning to the end, with a lot of attention, solving exercises as you go. Learn concepts, conceptions and techniques, all together.

—SA


是的。请浏览网上发现的数百万篇文章。但简单来说,聚意味着多变形意味着形式。表现出多种形式/行为的单个对象称为多态。有2种1.编译时间2.运行时间。我们必须写一篇文章来解释这些。最好通过一本好的C ++书。
Yes. Please go through the million of articles found over the web. But in simple terms "Poly" means multi "morph" means form. A single object which exhibits multiple forms/behavior is known as polymorphism. There are 2 kinds 1. Compile Time 2. Run time. We have to write an article to explain these. Better go through a good C++ book.


多态性有文化意味着'多种形式'。

基本上,一种方法可以通过使用不同的参数来采取多种形式设置或覆盖派生类。
Polymorphism literately means 'many forms'.
Basically, one method is allowed to take many forms by using a different parameter set or by overriding in a derived class.


这篇关于什么是面向对象编程中的多态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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