To avoid this problem, you can create an interface (for example, Vehicle) and have your FrogMan class accept the Vehicle as a constructor argument, as in Listing 3.
为了避免这个问题,您可以创建一个接口(例如vehicle),使frogman类接受Vehicle作为一个构造函数参数,如清单3所示。
Treasure Frogman is a game for the whole family.
珍惜蛙人是一个游戏,为整个家庭。
Treasure Frogman is a game for the whole family.
珍惜蛙人是一个游戏,为整个家庭。
应用推荐