透過您的圖書館登入
IP:18.225.234.109
  • 學位論文

Friend對物件導向程式之破壞

What Damage the Object-Oriented Program by Friendship

指導教授 : 林金城
若您是本文的作者,可授權文章由華藝線上圖書館中協助推廣。

摘要


物件導向程式語言的特性有封裝、繼承及多型,而繼承及多型所產生的錯誤非常難以追蹤。friend是C++所特有的語法,friend結構會破壞物件導向程式語言所擁有的優勢,使得程式變得更複雜。在本篇論文中將討論friend對C++程式語言的破壞,並將這些錯誤加以研究,且將現有對friend的誤解一一討論。在論文的最後提出一個初步在設計階段用來預估物件導向多型加入friend設計上的缺陷,給予開發者早期設計資以修改設計或是尋找其他的解決的方案。

關鍵字

多型 繼承 封裝 物件導向程式語言 friend

並列摘要


Object-oriented programming language. Friend keyword is a special syntax only in C++. Friend construct in C++ programming language is a violation of encapsulation, that will made default program become more and more difficult and complex. This paper will discuss how friend destroy the C++ programming language, and investigate this fault. Discuss the misunderstand of friend. This paper provide an estimating the polymorphism defects in design stage with friend. This metric can provide early information for developer on modify, redesign the system and find another way to fix these defect as will.

參考文獻


Roger T. Alexander, A. Jefferson Offutt, “Criteria for Testing Polymorphic Relationship”, 11th International Symposium on Software Reliability Engineering (ISSRE ’00), pages 15-23, San Jose CA, October2000.
[Alexander 2004]
Saїda Benlarbi, Walcelio L. Melo, “Polymorphism Measures for Early Risk Prediction” ,Proceedings of the 21th international conference on Software engineering, May 1999
Michael English, Jim Buckley, Tony Cahill, and Kristian Lynch, "An Empirical Study of the Use of Friends in C++ Software," iwpc, pp. 329-332, 13th International Workshop on Program Comprehension (IWPC'05), 2005.
[Jacobson 1992]

延伸閱讀