Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 456 Bytes

210101.md

File metadata and controls

20 lines (15 loc) · 456 Bytes

UML类图关系: 泛化与关联

js 最常用UML类图关系: 泛化与关联

泛化

是一种继承关系,表示一般与特殊的关系,它指定了子类如何继承父类的所有特征和行为。

class Child extend Parent {}

关联

是一种拥有的关系,它使一个类知道另一个类的属性和方法

class Other {}
class Parent {
  other: Other // Parent 与 Other 具有关联关系
}