首页> 外文期刊>Dr. Dobb's Journal >Disentangling Concepts in Object-Oriented Systems
【24h】

Disentangling Concepts in Object-Oriented Systems

机译:面向对象系统中的概念纠缠

获取原文
获取原文并翻译 | 示例
           

摘要

A class interface can be deceptively simple. Even though it may consist of only a few functions, those few functions may confound a number of distinct concepts. Consider, for instance, a class whose interface consists of only three functions: getStandingBlueBall(), getSittingRedDoor(), and getRunningYellowDog(). There are, in fact, three distinct concepts bound up in this interface: action (standing, sitting, or running), color (blue, red, or yellow), and object (ball, door, or dog). Although these three functions are named in accordance with their respective purposes, these single-token names do not clearly distinguish the three aforementioned concepts. Using object-oriented techniques, you can better "unpack" a class interface to distinguish the various concepts bound up in it. To illustrate these techniques, consider how best to implement the interface to a polar array class.
机译:类接口可以看似简单。即使它可能仅包含几个功能,但那几个功能可能会混淆许多不同的概念。例如,考虑一个类,其接口仅包含三个函数:getStandingBlueBall(),getSittingRedDoor()和getRunningYellowDog()。实际上,此界面中包含三个不同的概念:动作(站立,坐着或跑步),颜色(蓝色,红色或黄色)和物体(球,门或狗)。尽管这三个函数是根据它们各自的目的来命名的,但是这些单令牌名称并不能清楚地区分上述三个概念。使用面向对象的技术,您可以更好地“解压缩”类接口,以区分其中绑定的各种概念。为了说明这些技术,请考虑如何最好地实现与极坐标数组类的接口。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号