如何写一手漂亮的模型:面向对象编程的设计原则综述

面向对象的编程在实现想法乃至系统的过程中都非常重要,我们不论是使用 TensorFlow 还是 PyTorch 来构建模型都或多或少需要使用类和方法。而采用类的方法来构建模型会令代码非常具有可读性和条理性,本文介绍了算法实现中使用类和方法来构建模型所需要注意的设计原则,它们可以让我们的机器学习代码更加美丽迷人。

十年的泗洪网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。全网营销推广的优势是能够根据用户设备显示端的尺寸不同,自动调整泗洪建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。创新互联从事“泗洪网站设计”,“泗洪网站推广”以来,每个客户项目都认真落实执行。

大多数现代编程语言都支持并且鼓励面向对象编程(OOP)。即使我们最近似乎看到了一些偏离,因为人们开始使用不太受 OOP 影响的编程语言(例如 Go, Rust, Elixir, Elm, Scala),但是大多数还是具有面向对象的属性。我们在这里概括出的设计原则也适用于非 OOP 编程语言。

为了成功地写出清晰的、高质量的、可维护并且可扩展的代码,我们需要以 Python 为例了解在过去数十年里被证明是有效的设计原则。

一、对象类型

因为我们要围绕对象来建立代码,所以区分它们的不同责任和变化是有用的。一般来说,面向对象的编程有三种类型的对象。

1. 实体对象

这类对象通常对应着问题空间中的一些现实实体。比如我们要建立一个角色扮演游戏(RPG),那么简单的 Hero 类就是一个实体对象。

 
 
 
 
  1. class Hero:
  2.     def __init__(self, health, mana):
  3.         self._health = health
  4.         self._mana = mana
  5.     def attack(self) -> int:
  6.         """
  7.         Returns the attack damage of the Hero
  8.         """
  9.         return 1
  10.     def take_damage(self, damage: int):
  11.         self._health -= damage
  12.     def is_alive(self):
  13.         return self._health > 0

这类对象通常包含关于它们自身的属性(例如 health 或 mana),这些属性根据具体的规则都是可修改的。

2. 控制对象(Control Object)

控制对象(有时候也称作管理对象)主要负责与其它对象的协调,这是一些管理并调用其它对象的对象。我们上面的 RPG 案例中有一个很棒的例子,Fight 类控制两个英雄,并让它们对战。

 
 
 
 
  1. class Fight:
  2.     class FightOver(Exception):
  3.         def __init__(self, winner, *args, **kwargs):
  4.             self.winner = winner
  5.             super(*args, **kwargs)
  6.     def __init__(self, hero_a: Hero, hero_b: Hero):
  7.         self._hero_a = hero_a
  8.         self._hero_b = hero_b
  9.         self.fight_ongoing = True
  10.         self.winner = None
  11.     def fight(self):
  12.         while self.fight_ongoing:
  13.             self._run_round()
  14.         print(f'The fight has ended! Winner is #{self.winner}')
  15.     def _run_round(self):
  16.         try:
  17.             self._run_attack(self._hero_a, self._hero_b)
  18.             self._run_attack(self._hero_b, self._hero_a)
  19.         except self.FightOver as e:
  20.             self._finish_round(e.winner)
  21.     def _run_attack(self, attacker: Hero, victim: Hero):
  22.         damage = attacker.attack()
  23.         victim.take_damage(damage)
  24.         if not victim.is_alive():
  25.             raise self.FightOver(winner=attacker)
  26.     def _finish_round(self, winner: Hero):
  27.         self.winner = winner
  28.         self.fight_ongoing = False

在这种类中,为对战封装编程逻辑可以给我们提供多个好处:其中之一就是动作的可扩展性。我们可以很容易地将参与战斗的英雄传递给非玩家角色(NPC),这样它们就能利用相同的 API。我们还可以很容易地继承这个类,并复写一些功能来满足新的需要。

3. 边界对象(Boundary Object)

这些是处在系统边缘的对象。任何一个从其它系统获取输入或者给其它系统产生输出的对象都可以被归类为边界对象,无论那个系统是用户,互联网或者是数据库。

 
 
 
 
  1. class UserInput:
  2.     def __init__(self, input_parser):
  3.         self.input_parser = input_parser
  4.     def take_command(self):
  5.         """
  6.         Takes the user's input, parses it into a recognizable command and returns it
  7.         """
  8.         command = self._parse_input(self._take_input())
  9.         return command
  10.     def _parse_input(self, input):
  11.         return self.input_parser.parse(input)
  12.     def _take_input(self):
  13.         raise NotImplementedError()
  14. class UserMouseInput(UserInput):
  15.     pass
  16. class UserKeyboardInput(UserInput):
  17.     pass
  18. class UserJoystickInput(UserInput):
  19.     pass

这些边界对象负责向系统内部或者外部传递信息。例如对要接收的用户指令,我们需要一个边界对象来将键盘输入(比如一个空格键)转换为一个可识别的域事件(例如角色的跳跃)。

4. Bonus:值对象(Value Object)

价值对象代表的是域(domain)中的一个简单值。它们无法改变,不恒一。

如果将它们结合在我们的游戏中,Money 类或者 Damage 类就表示这种对象。上述的对象让我们容易地区分、寻找和调试相关功能,然而仅使用基础的整形数组或者整数却无法实现这些功能。

 
 
 
 
  1. class Money:
  2.     def __init__(self, gold, silver, copper):
  3.         self.gold = gold
  4.         self.silver = silver
  5.         self.copper = copper
  6.     def __eq__(self, other):
  7.         return self.gold == other.gold and self.silver == other.silver and self.copper == other.copper
  8.     def __gt__(self, other):
  9.         if self.gold == other.gold and self.silver == other.silver:
  10.             return self.copper > other.copper
  11.         if self.gold == other.gold:
  12.             return self.silver > other.silver
  13.         return self.gold > other.gold
  14.     def __add__(self, other):
  15.         return Money(gold=self.gold + other.gold, silver=self.silver + other.silver, copper=self.copper + other.copper)
  16.     def __str__(self):
  17.         return f'Money Object(Gold: {self.gold}; Silver: {self.silver}; Copper: {self.copper})'
  18.     def __repr__(self):
  19.         return self.__str__()
  20. print(Money(1, 1, 1) == Money(1, 1, 1))
  21. # => True
  22. print(Money(1, 1, 1) > Money(1, 2, 1))
  23. # => False
  24. print(Money(1, 1, 0) + Money(1, 1, 1))
  25. # => Money Object(Gold: 2; Silver: 2; Copper: 1)

它们可以归类为实体对象的子类别。

二、关键设计原则

设计原则是软件设计中的规则,过去这些年里已经证明它们是有价值的。严格地遵循这些原则有助于软件达到一流的质量。

1. 抽象(Abstraction)

抽象就是将一个概念在一定的语境中简化为原始本质的一种思想。它允许我们拆解一个概念来更好的理解它。

上面的游戏案例阐述了抽象,让我们来看一下 Fight 类是如何构建的。我们以尽可能简单的方式使用它,即在实例化的过程中给它两个英雄作为参数,然后调用 fight() 方法。不多也不少,就这些。

代码中的抽象过程应该遵循最少意外(POLA)的原则,抽象不应该用不必要和不相关的行为/属性。换句话说,它应该是直观的。

注意,我们的 Hero#take_damage() 函数不会做一些异常的事情,例如在还没死亡的时候删除角色。但是如果他的生命值降到零以下,我们可以期望它来杀死我们的角色。

2. 封装

封装可以被认为是将某些东西放在一个类以内,并限制了它向外部展现的信息。在软件中,限制对内部对象和属性的访问有助于保证数据的完整性。

将内部编程逻辑封装成黑盒子,我们的类将更容易管理,因为我们知道哪部分可以被其它系统使用,哪些不行。这意味着我们在保留公共部分并且保证不破坏任何东西的同时能够重用内部逻辑。此外,我们从外部使用封装功能变得更加简单,因为需要考虑的事情也更少。

在大多数编程语言中,封装都是通过所谓的 Access modifiers(访问控制修饰符)来完成的(例如 private,protected 等等)。Python 并不是这方面的最佳例子,因为它不能在运行时构建这种显式修饰符,但是我们使用约定来解决这个问题。变量和函数前面的_前缀就意味着它们是私有的。

举个例子,试想将我们的 Fight#_run_attack 方法修改为返回一个布尔变量,这意味着战斗结束而不是发生了意外。我们将会知道,我们唯一可能破坏的代码就是 Fight 类的内部,因为我们是把这个函数设置为私有的。

请记住,代码更多的是被修改而不是重写。能够尽可能清晰、较小影响的方式修改代码对开发的灵活性很重要。

3. 分解

分解就是把一个对象分割为多个更小的独立部分,这些独立的部分更易于理解、维护和编程。

试想我们现在希望 Hero 类能结合更多的 RPG 特征,例如 buffs,资产,装备,角色属性。

 
 
 
 
  1. class Hero:
  2.     def __init__(self, health, mana):
  3.         self._health = health
  4.         self._mana = mana
  5.         self._strength = 0
  6.         self._agility = 0
  7.         self._stamina = 0
  8.         self.level = 0
  9.         self._items = {}
  10.         self._equipment = {}
  11.         self._item_capacity = 30
  12.         self.stamina_buff = None
  13.         self.agility_buff = None
  14.         self.strength_buff = None
  15.         self.buff_duration = -1
  16.     def level_up(self):
  17.         self.level += 1
  18.         self._stamina += 1
  19.         self._agility += 1
  20.         self._strength += 1
  21.         self._health += 5
  22.     def take_buff(self, stamina_increase, strength_increase, agility_increase):
  23.         self.stamina_buff = stamina_increase
  24.         self.agility_buff = agility_increase
  25.         self.strength_buff = strength_increase
  26.         self._stamina += stamina_increase
  27.         self._strength += strength_increase
  28.         self._agility += agility_increase
  29.         self.buff_duration = 10  # rounds
  30.     def pass_round(self):
  31.         if self.buff_duration > 0:
  32.             self.buff_duration -= 1
  33.         if self.buff_duration == 0:  # Remove buff
  34.             self._stamina -= self.stamina_buff
  35.             self._strength -= self.strength_buff
  36.             self._agility -= self.agility_buff
  37.             self._health -= self.stamina_buff * 5
  38.             self.buff_duration = -1
  39.             self.stamina_buff = None
  40.             self.agility_buff = None
  41.             self.strength_buff = None
  42.     def attack(self) -> int:
  43.         """
  44.         Returns the attack damage of the Hero
  45.         """
  46.         return 1 + (self._agility * 0.2) + (self._strength * 0.2)
  47.     def take_damage(self, damage: int):
  48.         self._health -= damage
  49.     def is_alive(self):
  50.         return self._health > 0
  51.     def take_item(self, item: Item):
  52.         if self._item_capacity == 0:
  53.             raise Exception('No more free slots')
  54.         self._items[item.id] = item
  55.         self._item_capacity -= 1
  56.     def equip_item(self, item: Item):
  57.         if item.id not in self._items:
  58.             raise Exception('Item is not present in inventory!')
  59.         self._equipment[item.slot] = item
  60.         self._agility += item.agility
  61.         self._stamina += item.stamina
  62.         self._strength += item.strength
  63.         self._health += item.stamina * 5
  64. # 缺乏分解的案例

我们可能会说这份代码已经开始变得相当混乱了。

例如,我们的耐力分数为 5 个生命值,如果将来要修改为 6 个生命值,我们就要在很多地方修改这个实现。

解决方案就是将 Hero 对象分解为多个更小的对象,每个小对象可承担一些功能。下面展示了一个逻辑比较清晰的架构:

 
 
 
 
  1. from copy import deepcopy
  2. class AttributeCalculator:
  3.     @staticmethod
  4.     def stamina_to_health(self, stamina):
  5.         return stamina * 6
  6.     @staticmethod
  7.     def agility_to_damage(self, agility):
  8.         return agility * 0.2
  9.     @staticmethod
  10.     def strength_to_damage(self, strength):
  11.         return strength * 0.2
  12. class HeroInventory:
  13.     class FullInventoryException(Exception):
  14.         pass
  15.     def __init__(self, capacity):
  16.         self._equipment = {}
  17.         self._item_capacity = capacity
  18.     def store_item(self, item: Item):
  19.         if self._item_capacity < 0:
  20.             raise self.FullInventoryException()
  21.         self._equipment[item.id] = item
  22.         self._item_capacity -= 1
  23.     def has_item(self, item):
  24.         return item.id in self._equipment
  25. class HeroAttributes:
  26.     def __init__(self, health, mana):
  27.         self.health = health
  28.         self.mana = mana
  29.         self.stamina = 0
  30.         self.strength = 0
  31.         self.agility = 0
  32.         self.damage = 1
  33.     def increase(self, stamina=0, agility=0, strength=0):
  34.         self.stamina += stamina
  35.         self.health += AttributeCalculator.stamina_to_health(stamina)
  36.         self.damage += AttributeCalculator.strength_to_damage(strength) + AttributeCalculator.agility_to_damage(agility)
  37.         self.agility += agility
  38.         self.strength += strength
  39.     def decrease(self, stamina=0, agility=0, strength=0):
  40.         self.stamina -= stamina
  41.         self.health -= AttributeCalculator.stamina_to_health(stamina)
  42.         self.damage -= AttributeCalculator.strength_to_damage(strength) + AttributeCalculator.agility_to_damage(agility)
  43.         self.agility -= agility
  44.         self.strength -= strength
  45. class HeroEquipment:
  46.     def __init__(self, hero_attributes: HeroAttributes):
  47.         self.hero_attributes = hero_attributes
  48.         self._equipment = {}
  49.     def equip_item(self, item):
  50.         self._equipment[item.slot] = item
  51.         self.hero_attributes.increase(stamina=item.stamina, strength=item.strength, agility=item.agility)
  52. class HeroBuff:
  53.     class Expired(Exception):
  54.         pass
  55.     def __init__(self, stamina, strength, agility, round_duration):
  56.         self.attributes = None
  57.         self.stamina = stamina
  58.         self.strength = strength
  59.         self.agility = agility
  60.         self.duration = round_duration
  61.     def with_attributes(self, hero_attributes: HeroAttributes):
  62.         buff = deepcopy(self)
  63.         buff.attributes = hero_attributes
  64.         return buff
  65.     def apply(self):
  66.         if self.attributes is None:
  67.             raise Exception()
  68.         self.attributes.increase(stamina=self.stamina, strength=self.strength, agility=self.agility)
  69.     def deapply(self):
  70.         self.attributes.decrease(stamina=self.stamina, strength=self.strength, agility=self.agility)
  71.     def pass_round(self):
  72.         self.duration -= 0
  73.         if self.has_expired():
  74.             self.deapply()
  75.             raise self.Expired()
  76.     def has_expired(self):
  77.         return self.duration == 0
  78. class Hero:
  79.     def __init__(self, health, mana):
  80.         self.attributes = HeroAttributes(health, mana)
  81.         self.level = 0
  82.         self.inventory = HeroInventory(capacity=30)
  83.         self.equipment = HeroEquipment(self.attributes)
  84.         self.buff = None
  85.     def level_up(self):
  86.         self.level += 1
  87.         self.attributes.increase(1, 1, 1)
  88.     def attack(self) -> int:
  89.         """
  90.         Returns the attack damage of the Hero
  91.         """
  92.         return self.attributes.damage
  93.     def take_damage(self, damage: int):
  94.         self.attributes.health -= damage
  95.     def take_buff(self, buff: HeroBuff):
  96.         self.buff = buff.with_attributes(self.attributes)
  97.         self.buff.apply()
  98.     def pass_round(self):
  99.         if self.buff:
  100.             try:
  101.                 self.buff.pass_round()
  102.             except HeroBuff.Expired:
  103.                 self.buff = None
  104.     def is_alive(self):
  105.         return self.attributes.health > 0
  106.     def take_item(self, item: Item):
  107.         self.inventory.store_item(item)
  108.     def equip_item(self, item: Item):
  109.         if not self.inventory.has_item(item):
  110.             raise Exception('Item is not present in inventory!')
  111.         self.equipment.equip_item(item)

现在,在将 Hero 对象分解为 HeroAttributes、HeroInventory、HeroEquipment 和 HeroBuff 对象之后,未来新增功能就更加容易、更具有封装性、具有更好的抽象,这份代码也就越来越清晰了。

下面是三种分解关系:

  • 关联:在两个组成部分之间定义一个松弛的关系。两个组成部分不互相依赖,但是可以一起工作。例如 Hero 对象和 Zone 对象。
  • 聚合:在整体和部分之间定义一个弱「包含」关系。这种关系比较弱,因为部分可以在没有整体的时候存在。例如 HeroInventory(英雄财产)和 Item(条目)。HeroInventory 可以有很多 Items,而且一个 Items 也可以属于任何 HeroInventory(例如交易条目)。
  • 组成:一个强「包含」关系,其中整体和部分不能彼此分离。部分不能被共享,因为整体要依赖于这些特定的部分。例如 Hero(英雄)和 HeroAttributes(英雄属性)。

4. 泛化

泛化可能是最重要的设计原则,即我们提取共享特征,并将它们结合到一起的过程。我们都知道函数和类的继承,这就是一种泛化。

做一个比较可能会将这个解释得更加清楚:尽管抽象通过隐藏非必需的细节减少了复杂性,但是泛化通过用一个单独构造体来替代多个执行类似功能的实体。

 
 
 
 
  1. # Two methods which share common characteristics
  2. def take_physical_damage(self, physical_damage):
  3.     print(f'Took {physical_damage} physical damage')
  4.     self._health -= physical_damage
  5. def take_spell_damage(self, spell_damage):
  6.     print(f'Took {spell_damage} spell damage')
  7.     self._health -= spell_damage
  8. # vs.
  9. # One generalized method
  10. def take_damage(self, damage, is_physical=True):
  11.     damage_type = 'physical' if is_physical else 'spell'
  12.     print(f'Took {damage} {damage_type} damage')
  13.     self._health -= damage

以上是函数示例,这种方法缺少泛化性能,而下面展示了具有泛化性能的案例。

 
 
 
 
  1. class Entity:
  2.     def __init__(self):
  3.         raise Exception('Should not be initialized directly!')
  4.     def attack(self) -> int:
  5.         """
  6.         Returns the attack damage of the Hero
  7.         """
  8.         return self.attributes.damage
  9.     def take_damage(self, damage: int):
  10.         self.attributes.health -= damage
  11.     def is_alive(self):
  12.         return self.attributes.health > 0
  13. class Hero(Entity):
  14.     pass
  15. class NPC(Entity):
  16.     pass

这里,我们通过将它们的共同功能移动到基本类中来减少复杂性,而不是让 NPC 类和 Hero 类将所有的功能都实现两次。

我们可能会过度使用继承,因此很多有经验的人都建议我们更偏向使用组合(Composition)而不是继承(https://stackoverflow.com/a/53354)。

继承常常被没有经验的程序员滥用,这可能是由于继承是他们首先掌握的 OOP 技术。

5. 组合

组合就是把多个对象结合为一个更复杂对象的过程。这种方法会创建对象的示例,并且使用它们的功能,而不是直接继承它。

使用组合原则的对象就被称作组合对象(composite object)。这种组合对象在要比所有组成部分都简单,这是非常重要的一点。当把多个类结合成一个类的时候,我们希望把抽象的层次提高一些,让对象更加简单。

组合对象的 API 必须隐藏它的内部模块,以及内部模块之间的交互。就像一个机械时钟,它有三个展示时间的指针,以及一个设置时间的旋钮,但是它内部包含很多运动的独立部件。

正如我所说的,组合要优于继承,这意味着我们应该努力将共用功能移动到一个独立的对象中,然后其它类就使用这个对象的功能,而不是将它隐藏在所继承的基本类中。

让我们阐述一下过度使用继承功能的一个可能会发生的问题,现在我们仅仅向游戏中增加一个行动:

 
 
 
 
  1. class Entity:
  2.     def __init__(self, x, y):
  3.         self.x = x
  4.         self.y = y
  5.         raise Exception('Should not be initialized directly!')
  6.     def attack(self) -> int:
  7.         """
  8.         Returns the attack damage of the Hero
  9.         """
  10.         return self.attributes.damage
  11.     def take_damage(self, damage: int):
  12.         self.attributes.health -= damage
  13.     def is_alive(self):
  14.         return self.attributes.health > 0
  15.     def move_left(self):
  16.         self.x -= 1
  17.     def move_right(self):
  18.         self.x += 1
  19. class Hero(Entity):
  20.     pass
  21. class NPC(Entity):
  22.     pass

好了,如果我们想在游戏中引入坐骑呢?坐骑也应该需要左右移动,但是它没有攻击的能力,甚至没有生命值。

我们的解决方案可能是简单地将 move 逻辑移动到独立的 MoveableEntity 或者 MoveableObject 类中,这种类仅仅含有那项功能。

那么,如果我们想让坐骑具有生命值,但是无法攻击,那该怎么办呢?希望你可以看到类的层次结构是如何变得复杂的,即使我们的业务逻辑还是相当简单。

一个从某种程度来说比较好的方法是将动作逻辑抽象为 Movement 类(或者其他更好的名字),并且在可能需要的类里面把它实例化。这将会很好地封装函数,并使其在所有种类的对象中都可以重用,而不仅仅局限于实体类。

6. 批判性思考

尽管这些设计原则是在数十年经验中形成的,但盲目地将这些原则应用到代码之前进行批判性思考是很重要的。

任何事情都是过犹不及!有时候这些原则可以走得很远,但是实际上有时会变成一些很难使用的东西。

作为一个工程师,我们需要根据独特的情境去批判地评价最好的方法,而不是盲目地遵从并应用任意的原则。

三、关注点的内聚、耦合和分离

1. 内聚(Cohesion)

内聚代表的是模块内部责任的分明,或者是模块的复杂度。

如果我们的类只执行一个任务,而没有其它明确的目标,那么这个类就有着高度内聚性。另一方面,如果从某种程度而言它在做的事情并不清楚,或者具有多于一个的目标,那么它的内聚性就非常低。

我们希望代码具有较高的内聚性,如果发现它们有非常多的目标,或许我们应该将它们分割出来。

2. 耦合

耦合获取的是连接不同类的复杂度。我们希望类与其它的类具有尽可能少、尽可能简单的联系,所以我们就可以在未来的事件中交换它们(例如改变网络框架)。

在很多编程语言中,这都是通过大量使用接口来实现的,它们抽象出处理特定逻辑的类,然后表征为一种适配层,每个类都可以嵌入其中。

3. 分离关注点

分离关注点(SoC)是这样一种思想:软件系统必须被分割为功能上互不重叠的部分。或者说关注点必须分布在不同的地方,其中关注点表示能够为一个问题提供解决方案。

网页就是一个很好的例子,它具有三个层(信息层、表示层和行为层),这三个层被分为三个不同的地方(分别是 HTML,CSS,以及 JS)。

如果重新回顾一下我们的 RPG 例子,你会发现它在最开始具有很多关注点(应用 buffs 来计算袭击伤害、处理资产、装备条目,以及管理属性)。我们通过分解将那些关注点分割成更多的内聚类,它们抽象并封装了它们的细节。我们的 Hero 类现在仅仅作为一个组合对象,它比之前更加简单。

四、结语

对小规模的代码应用这些原则可能看起来很复杂。但是事实上,对于未来想要开发和维护的任何一个软件项目而言,这些规则都是必须的。在刚开始写这种代码会有些成本,但是从长期来看,它会回报以几倍增长。

这些原则保证我们的系统更加:

  • 可扩展:高内聚使得不用关心不相关的功能就可以更容易地实现新模块。
  • 可维护:低耦合保证一个模块的改变通常不会影响其它模块。高内聚保证一个系统需求的改变只需要更改尽可能少的类。
  • 可重用:高内聚保证一个模块的功能是完整的,也是被妥善定义的。低耦合使得模块尽可能少地依赖系统的其它部分,这使得模块在其它软件中的重用变得更加容易。

在本文中,我们首先介绍了一些高级对象的类别(实体对象、边界对象以及控制对象)。然后我们了解了一些构建对象时使用的关键原则,比如抽象、泛化、分解和封装等。最后,我们引入了两个软件质量指标(耦合和内聚),然后学习了使用这些原则能够带来的好处。

我希望这篇文章提供了一些关于设计原则的概览,如果我们希望自己能够在这个领域获得更多的进步,我们还需要了解更多具体的操作。

原文地址:

https://medium.freecodecamp.org/a-short-overview-of-object-oriented-software-design-c7aa0a622c83

【本文是专栏机构“机器之心”的原创译文,微信公众号“机器之心( id: almosthuman2014)”】

网站栏目:如何写一手漂亮的模型:面向对象编程的设计原则综述
本文来源:http://www.hantingmc.com/qtweb/news20/75220.html

网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联