qq_蔓珠沙华_0
2017-08-20 18:35
package com.project5;
public class Circle extends Shape {
@Override
public void C(double r){
// TODO Auto-generated method stub
double cc=3.14;
double CC=2*cc*r;
System.out.println("C"+CC);
}
@Override
public void S(double r) {
// TODO Auto-generated method stub
double cc=3.14;
double SS=cc*r*r;
System.out.println("S"+SS);
}
}
你的shape 里边是不是有抽象方法,没有在circle类中实现?
package com.project5; public abstract class Shape { public abstract void C(double x,double y); public abstract void C(double r); public abstract void S(double x,double y); public abstract void S(double r); } 是这样的
Java入门第二季 升级版
530554 学习 · 6091 问题
相似问题