Creatures with wings

Report a typo

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:

Write a program in Scala 3
class Mosquito()

class Ostrich()

class Plane()
___

Create a free account to access the full topic