UML聚合和组合
聚合public class Mouse{
}
public class Monitor{
}
public class Compute{
private Mouse mouse;
private Monitor monitor;
}
组合
public class Mouse{
}
public class Monitor{
}
public class Compute{
private Mouse mouse = new Mouse();
private Monitor monitor = new Monitor();
}
总结:可分离聚合,不可分离组合
页:
[1]