JAVA设计程序,父类是图形,产生子类,三角型,正方

2020-12-05 20:45:09 字数 405 阅读 5711

1楼:匿名用户

class sharp

public void printarea()} class ******** extends sharppublic void area()

} class rect extends sharppublic void area()

}class trapezoid extends sharppublic void area()

}public class test}}

2楼:匿名用户

public class sharp

}public class ******** extends sharp

}public class square extends sharp{}