用Java实现猫鼠游戏这个小游戏
Cat类
public class Cat {
private String name;
private double weight;
public Cat(String name, double weight) {
this.name = name;
this.weight = weight;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public double getWeight() {
return weight;
}
public void setWeight(double weight) {
this.weight = weight;