public class BigValue{
float result;
public BigValue(int a,int b){
result=calculateResult(a,b);
}
float calculateResult(int a,int b){
return (a*10)+(b*2);
}
public static void main(String[] arguments) {
BigValue bgr=new BigValue(2,3,4);
System.out.println("The result is"+bgr.result);
}
}
class BiggerValue extends BigValue{
BiggerValue(int a,int b, int c){
super(a,b);
result=calculateResult(a,b,c);
}
// answer goes here
return (c*3)*result;
}
}
问题是我怎么样才能得到312.0
|