这种错误怎么改呀
下面是代码
public interface ComputeWeight{
double ComputeWeight();
}
public class ComputeWeight implements Television
{
double w1;
Television(double w1)
{
super();
this.w1 = w1;
}
return double w1;
}
public class ComputeWeight implements AirConditioner
{
double w2;
AirConditioner(double w2)
{
super();
this.w2 = w2;
}
return w2;
}
public class ComputeWeight implements WashMachine
{
double w3;
WashMachine(double w3)
{
super();
this.w3 = w3;
}
return w3;
}
public class Truck {
private ComputeWeight goods[];
Truck(ComputerWeight[] goods)
{
super();
this.goods = goods;
}
public double getTotalWeight()
{
double sum = 0;
for (i = 0;i<goods.length ;i++)
{
type=input.nextInt();
if (type==1)
sum = sum +16.6;
else if (type==2)
sum = sum + 40.0;
else if (type==3)
sum = sum +60.0;
}
return sum;
}
}