0
Under review

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

louis cai 5 years ago updated by anonymous 5 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;
    }
}