用cmd 不能运行,请问如何改正才能用cmd 运行
public abstract class shape{
public abstract double C();
public abstract double S();}
public class Rectaugle extends shape {
double a=4.5;
double b=2.1;
double c=(a+b)*2;
double s=a*b;
public double C (){
System.out.println("矩形周长为"+c);
return c;}
public double S(){
System.out.println("面积为"+s);
return s;}
}
public class Circle extends shape {
final double p=3.14;
double r=2.1;
double c=2*p*r;
double s=p*r*r;
public double C(){
return c;
System.out.println("圆形周长为"+c);}
public double S(){
System.out.println("面积为"+s);
return s;}
}
public class Hello{
public static void main (String [] args){
shape s1=new Rectaugle();
shape s2=new Circle();
s1.C();
s1.S();
s2.C();
s2.S();}
}