用类描述计算机中的CPU速度和硬盘的容量
package test2;
public class CPU {
int speed;
void setSpeed(int m){
speed=m;
}
int getSpeed(){
return speed;
}
}
package test2;
public class HardDisk {
int amount;
int getAmount(){
return amount;
}
void setAmount(int m){
amount=m;
}
}