# 电子工程代写|面向对象的系统设计代写Object-Oriented Systems Design代考|COMP3832

## 电子工程代写|面向对象的系统设计代写Object-Oriented Systems Design代考|Overview of Identity Disharmonies

The most frequent and easily recognizable sign of an identity disharmony is excessive size and complexity of a class and its methods (Proportion Rule). Any investigation that intends to assess and improve the identity harmony of a system usually starts with those classes and methods that stand out due to their size. This is very important, because as we will see also in Sect. $5.9$ the process of recovering from design problems uses these outlying design fragments as a starting point.

In the remainder of this chapter we present detection strategies that capture oversized and overcomplex methods (Brain Method(92)) and the classes that host them (Brain Class(97)). In many cases these outliers are caused by the presence of code duplication; consequently we check for code duplication within classes (Duplication (102)) with excessive size and complexity (see Fig. 5.1).

Another sign of disharmonious identity is the non-cohesiveness of behavior (Presentation Rule and Implementation Rule) and the tendency to attract more and more features, to gather more and more services (Riel calls such a disharmony a God Class(80) [Rie96]). We defined a detection strategy to detect such classes. The more a class tends to become a God Class(80), the more the other classes communicating with it tend to become simple data providers. A data provider does not offer much functionality; instead it merely provides raw data and tends to become a Data Class(88) [Rie96, $\left.\mathrm{FBB}^{+} 99\right]$. As an imme-diate consequence, the methods of the (God) classes, which use the foreign data, smell of Feature Envy(84) [ $\left.\mathrm{FBB}^{+} 99\right]$, being more interested in the attributes of other classes than those of their own class.

## 电子工程代写|面向对象的系统设计代写Object-Oriented Systems Design代考|God Class

In a good object-oriented design the intelligence of a system is uniformly distributed among the top-level classes [Rie96]. The God Class design flaw refers to classes that tend to centralize the intelligence of the system. A God Class performs too much work on its own, delegating only minor details to a set of trivial classes and using the data from other classes. This has a negative impact on the reusability and the understandability of that part of the system. This design problem is comparable to Fowler’s Large Class bad smell $\left[\mathrm{FBB}^{+} 99\right]$.
Classes.
God Class is potentially harmful to a system’s design because it is an aggregation of different abstractions and (mis)use other classes (often mere data holder) to perform its functionality (see Proportion and Implementation Rules). Most of the time they are against the basic principles of object-oriented design which is that one class should have one responsibility. At this point it is important to mention that a God Class is a real problem if it hampers the evolution of the software system. Thus a class that has the structural characteristics of a God Class but that resides in a stable and untouched part of the system does not pose a problem!

The detection of a God Class is based on three main characteristics (Fig. 5.2):

They heavily access data of other simpler classes, either directly or using accessor methods.

They are large and complex

They have a lot of non-communicative behavior i.e., there is a low cohesion between the methods belonging to that class.

## 电子工程代写|面向对象的系统设计代写Object-Oriented Systems Design代考|God Class

God Class 可能对系统设计有害，因为它是不同抽象的集合，并且（错误地）使用其他类（通常只是数据持有者）来执行其功能（请参阅比例和实施规则）。大多数时候，它们违反了面向对象设计的基本原则，即一个类应该有一个责任。在这一点上，重要的是要提到如果上帝类阻碍了软件系统的发展，它就是一个真正的问题。因此，具有上帝类的结构特征但驻留在系统稳定且未触及的部分的类不会造成问题！

myassignments-help数学代考价格说明

1、客户需提供物理代考的网址，相关账户，以及课程名称，Textbook等相关资料~客服会根据作业数量和持续时间给您定价~使收费透明，让您清楚的知道您的钱花在什么地方。

2、数学代写一般每篇报价约为600—1000rmb，费用根据持续时间、周作业量、成绩要求有所浮动(持续时间越长约便宜、周作业量越多约贵、成绩要求越高越贵)，报价后价格觉得合适，可以先付一周的款，我们帮你试做，满意后再继续，遇到Fail全额退款。

3、myassignments-help公司所有MATH作业代写服务支持付半款，全款，周付款，周付款一方面方便大家查阅自己的分数，一方面也方便大家资金周转，注意:每周固定周一时先预付下周的定金，不付定金不予继续做。物理代写一次性付清打9.5折。

Math作业代写、数学代写常见问题

myassignments-help擅长领域包含但不是全部: