```java
public class Tester {
public static void main(String[] args) {
SimCard a=new SimCard("12345678901");
SimCard b=new SimCard("12345678902");
Battery c=new Battery(2000);
Battery d=new Battery(3000);
Cellphone f=new Cellphone(a,b,2000);
System.out.println("card1's number"+a.getNumber());
System.out.println("card2's number"+b.getNumber());
System.out.println("card1's capacity"+c.getCapacity());
System.out.println("card2's capacity"+d.getCapacity());
Cellphone n=new Cellphone(a,b,3000);
System.out.println(n.getBatteryCapacity());
System.out.println("Hello World!");
}
}
class SimCard{
private String number;
public String getNumber(){
return number;
}
public SimCard(String a){
number=a;
}
}
class Battery{
private int capacity=0;
public int getCapacity(){
return capacity;
}
public Battery(int a){
capacity=a;
}
}
class CellPhone{
private SimCard card1,card2;
private Battery battery;
CellPhone(SimCard c1,SimCard c2,Battery bt){
card1=c1;
card2=c2;
battery=bt;
}
CellPhone(SimCard c1,Battery bt){
card1=c1;
battery=bt;
}
public void setCard1(SimCard c){
card1=c;
}
public void setCard2(SimCard c){
card2=c;
}
public SimCard getCard1Number(){
return card1;
}
public SimCard getCard2Number(){
return card2;
}
public void setBattery(Battery bt){
battery=bt;
}
public Battery getBattreyCapacity(){
return battery;
}
}
```报错如下:Exception in thread "main" java.lang.RuntimeException: Uncompilable code - 找不到符号
符号: 类 Cellphone
位置: 类 com.mycompany.tester.Tester
at com.mycompany.tester.Tester.main(Tester.java:1)
Command execution failed.