OOP中继承机制剖析  被引量:1

Analysis of OOP inheritance mechanism

在线阅读下载全文

作  者:邵艳玲[1] 刘克成[1] 

机构地区:[1]南阳理工学院计算机科学与技术系,河南南阳473004

出  处:《电子设计工程》2011年第8期29-31,37,共4页Electronic Design Engineering

摘  要:继承是面向对象程序设计方法学中重要的机制。采用继承机制来组织和设计类,可以提高程序的抽象程度,使之更接近与人类的自然思维。研究了继承的特点,通过程序实例,进行对比分析,探讨了C++语言中由继承带来的属性的隐藏和方法的覆盖、遮蔽等重要性质,得出使用继承不仅可以使得大量的代码可以复用,而且可以大大减少代码和数据的冗余度,同时由方法的覆盖可以实现真正意义上的多态,并由此使得程序具有更好的扩展性。Inheritance is an important mechanism of object-oriented programming methodology. Using the inheritance mechanism to organize and design classes, the program can improve the level of abstraction, making it more close to the nature of human thought. It studies the inheritance of characteristics in C ++ language, brought by the succession of the hidden properties and methods of coverage, shelter and other important properties by instances, comparative analysis. The results show that using the inheritance not only can make a lot of code reuse, but also can significantly reduce the redundancy of code and data, while the coverage can be achieved by the method of truly multi-state, and thus makes the application more scalability.

关 键 词:面向对象程序设计 继承 C++ 覆盖 遮蔽 

分 类 号:TP393[自动化与计算机技术—计算机应用技术]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象