We have the following structures:
trait HasWings
trait CanFly
abstract class Machine()
Modify the classes below so that Mosquito had wings and could fly, Ostrich had wings but could not fly, and Plane had wings, could fly, and was a machine.
We have the following structures:
trait HasWings
trait CanFly
abstract class Machine()
Modify the classes below so that Mosquito had wings and could fly, Ostrich had wings but could not fly, and Plane had wings, could fly, and was a machine.
Sample Input 1:
Sample Output 1:
Create a free account to access the full topic