package com.imooc.test2;
public class Tectangle extends Shape {
double length;
double width;
public Tectangle(double length,double width){
this.length=length;
this.width=width;
}
@Override
public double perimeter() {
double perimeter=this.length*2+this.width*2;
return perimeter;
}
@Override
public double area() {
double area=this.length*this.width;
return area;
}
}
//这是我自己建的tectangle类
package com.imooc.test2;
public abstract class Shape {
public abstract double perimeter();
public abstract double area();
}
//这是shape类
eclipse一直在提示我在tectangle里创建的两个方法必须覆盖或实现超类型方法
这是为啥呢
虚心求教 望各位解惑 在此谢过