制作8鹏3 图 限定关联 dir dir filename file file
图 限定关联 制作 龙鹏飞 dir file 1 * dir filename file 1 1
制作8鹏3 (6)关联的种类 按照关联所连接的类的数量,关联可分为自返 关联、二元关联和N元关联。 年份类 多边形类 人类 父 0.n子女 运动队类。远运动员类 记录类 点类
(6)关联的种类 按照关联所连接的类的数量,关联可分为自返 关联、二元关联和N元关联。 制作 龙鹏飞 人类 0..n 1 子女 父 年份类 运动队类 运动员类 记录类 n n n 多边形类 点类 3 ..n 1
制作8鹏3 代码-1 代码-1:自返关联 public class Person Person parent Person Children /System. Collections. ArrayList Children
代码-1 代码-1:自返关联 public class Person { Person Parent; Person []Children; //System.Collections.ArrayList Children; ...... } 制作 龙鹏飞
制作8鹏3 代码-2 代码-2:二元关联 public class Polygon Point [Points /System. Collections. Array List Points public class Point Polygon Owner
代码-2 代码-2:二元关联 public class Polygon { Point []Points; //System.Collections.ArrayList Points; ...... } public class Point { Polygon Owner; ...... } 制作 龙鹏飞