教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 文库大全 > 教育文库 >

A critique of cohesion measures in the object-oriented parad(2)

来源:网络收集 时间:2026-05-21
导读: Cohesion refers to the relatedness of a module's components. In the object-oriented paradigm, cohesion refers to the relatedness among the methods of a class. Most of the current measures of cohesion

Cohesion refers to the "relatedness " of a module's components. In the object-oriented paradigm, cohesion refers to the "relatedness " among the methods of a class. Most of the current measures of cohesion in the object-oriented paradig

measures we propose for measuring data cohesion in the object-oriented paradigm. Contrary to our hypothesis that data abstractions and data interactions go hand in hand, we see that the measures always give low values. Typically, methods used only a small subset of the slice data tokens. This caused us to step back and reconsider our assumption about cohesion in the object-oriented paradigm. The result is this thesis. We examine the existing measures in the object-oriented paradigm claimed to be cohesion measures to determine if they were proper numerical characterization of cohesion. As a preliminary step towards validation of these measures, we present a list of properties that any cohesion measure should satisfy. The existing measures are then compared with the properties to see if they satisfy the properties. Although most of the measures satis ed the list of properties, there were other inconsistencies between the measures and our understanding of cohesion. The measures were not proper numer

ical characterization of cohesion. Hence, we conclude that the measures are not appropriate for measuring cohesion in the object-oriented paradigm. Chapter 2 introduces some of the basic concepts of the object-oriented paradigm, and provides a discussion of some existing metrics for measuring various attributes of objectoriented software. An introduction to the concept of cohesion and cohesion in the objectoriented paradigm is also given. Chapter 3 is a discussion of some existing measures claimed to be cohesion measures in the object-oriented paradigm. A list of properties of cohesion that any cohesion measure must satisfy is presented in Chapter 4. This is followed by a comparison of the measures discussed in Chapter 3 with the list of properties to determine if the measures satisfy the properties. In addition, inconsistencies between the measures and our understanding of cohesion are also discussed. We then look at an example class with no data interactions to see what the measures indicate about the cohesion of such a class. Along with our earlier ndings, this raises questions about the concept of cohesion in the object-oriented paradigm. We hypothesize that in addition to data cohesion another form of cohesion exists which is based in the application domain and hence we refer to it as application-based cohesion. Chapter 5 is a summary of the research work and also suggests future directions for research.

2

Cohesion refers to the "relatedness " of a module's components. In the object-oriented paradigm, cohesion refers to the "relatedness " among the methods of a class. Most of the current measures of cohesion in the object-oriented paradig

Chapter 2

Background2.1 The Object-Oriented ParadigmIn order to be able to de ne metrics to measure the attributes of a paradigm, it is of foremost importance to rst understand the paradigm. Details of the object-oriented paradigm can be found in most C++ books such as 23, 27]. This section is a brief introduction to some of the concepts of the object-oriented paradigm, such as classes, methods, and objects. The procedural paradigm is based on the approach of functional decomposition of the tasks to achieve the goal (or solve a problem). The basic unit is a procedure or a function. Languages that support this paradigm provide facilities for passing arguments to functions and returning values from the functions 27]. Unlike the procedural paradigm, the objectoriented paradigm views any given problem as being a collection of interacting objects 26, 28]. Languages that support the object-oriented paradigm have facilities for de ning a set of operations (functions or operators) for a data type and then restricting the access to the objects of the particular type only to the set of operations de ned 27]. The basic unit of the object-oriented paradigm is a class. A class is an aggregate of named data elements, and a set of operations designed to manipulate that data. The class members or methods are composed of operations that can be performed on the data type by the class and the data required to represent the class abstraction. Methods can have their own local variables and can use the variables de ned in the class. A class can use the me

thods of another class. The same methods are always invoked in response to a similar message from its own class or from another class. The protected, private and public keywords control access to the class members. Members that occur in the public section of the class can be accessed from anywhere within the general program. Members and data elements that occur in a protected or private section can be accessed only by members of the class. The data elements are also referred to as the instance variables of the class. A private declaration of data elements or instance variables is said to be encapsulated 27]. A class can encapsulate a data type. Such access restriction is referred to as information hiding. An object is an instantiation of a class. An object, too, encapsulates both data and operations.

3

Cohesion refers to the "relatedness " of a module's components. In the object-oriented paradigm, cohesion refers to the "relatedness " among the methods of a class. Most of the current measures of cohesion in the object-oriented paradig

2.2 Measures in the Object-Oriented ParadigmResearchers have proposed various metrics in an attempt to measure the attributes of the object-oriented paradigm such as complexity, and reuse. In 24], Monarchi, Sheetz and Tegarden address object-oriented system complexity at the application, object, method, and variable le …… 此处隐藏:6551字,全部文档内容请下载后查看。喜欢就下载吧 ……

A critique of cohesion measures in the object-oriented parad(2).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wenku/108005.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)