Show
brent = Person "Brent" 31 SealingWax
stan = Person "Stan" 94 Cabbage但是,getAge Person "a" 1 Cabbage会导致错误: Couldn't match expected type `Person'arguments
In the first argu
我在GoodCabbages子类中实现了它,如下所示: int x = (int) (Math.random() * (GARDEN_WIDTH - CABBAGE_RADIUS)); Oval o = new Oval(x, y,CABBAGE_RADIUS, CABBAGE_RADIUS, Color.WHITE, true)