//这是startuml 把uml 转换成的java代码:

public class Circle implements Ishape {
private double _radius;
public double getArea() { } public double getArea();
} public class Pizza implements Ishape {
private double price;
private Ishape _shape;
public double getprice() { } public Ishape getshape() { } public double Pizza() { } public double getArea();
} public class Rectangle implements Ishape {
private double _width;
private Object _height;
public double getArea() { } public double getArea();
} public interface Ishape {
public abstract double getArea();
}

下面是关系图:

使用staruml学习画类图-LMLPHP

04-20 11:48