0
审核中

SquarePegAdapter 没有提供父类的默认构造方法

louis cai 4 years ago updated by anonymous 4 years ago 1
没有提供父类的默认构造方法
public class SquarePegAdapter extends RoundPeg {
    private SquarePeg peg;

    public SquarePegAdapter(SquarePeg peg) {
        this.peg = peg;
    }

    @Override
    public double getRadius() {
        double result;
        // Calculate a minimum circle radius, which can fit this peg.
        result = (Math.sqrt(Math.pow((peg.getWidth() / 2), 2) * 2));
        return result;
    }
}