使用staruml学习画类图

时间:2023-03-10 07:27:32
使用staruml学习画类图
//这是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学习画类图