标签:java
/**11
* 編寫一個求平均值的接口與實現該接口的類
**/
public class Test{
public static void main(String[] args){
}
}
interface Average {
double DoubleNumber(double a, double b);
}
class AverageDouble implements Average{
private double a, b;
public double DoubleNumber(double a, double b){
this.a = a;
this.b = b;
return ((a * b) / 2);
}
}本文出自 “hacker” 博客,请务必保留此出处http://anglecode.blog.51cto.com/5628271/1619895
标签:java
原文地址:http://anglecode.blog.51cto.com/5628271/1619895