UML类图--类之间的关系
程序员文章站
2024-02-19 22:33:40
...
interface IFly{
void fly();
}
interface ILanguage{
void speak();
}
class Bird extends Animal{}
class WideGoose implements IFly{}
class Penguin extends Bird{
private Climate climate;//在企鹅Penguin中,引用到气候Climate对象
}
class WideGooseAggregate{
private WideGoose[] arrayWideGoose;//在雁群WideGooseAggregate类中,有大雁数组对象arrayWideGoose
}
class Bird {
private Wing wing;
public Bird(){
wing = new Wing();
}
}
abstract class Animal {
public void Metabolism(Oxygen oxygen, Water water) {
}
}
转载于:https://my.oschina.net/gAKey/blog/1536204
上一篇: MySQL插入中文不乱码的5种方法
下一篇: 协作图详解