JAVA编程题:编一个程序包含一个接口 shape(该接口中定义抽象函数calarea()), 一个圆类和一个长方形类
JAVA编程题:编一个程序包含一个接口 shape(该接口中定义抽象函数calarea()), 一个圆类和一个长方形类
日期:2017-11-26 07:27:47 人气:1
//Shape.java
public interface Shape{
public double calarea();
}
//Rectangle.java
public class Rectangle implements Shape{
private double length;
private double high;
public Rectangle(double length,double high){
this.length = lengt