Java Interface Bird#9717

Java Interface Bird

1 second
128 megabytes
Very easy

Implement interfaces Eat, Fly, Sleep.

Implement class Bird that implements interfaces Eat, Fly, Sleep.

interface Fly {
  void fly();
}

interface Eat {
  void eat();
}

interface Sleep {
  void sleep();
}

class Bird implements Fly, Eat, Sleep {
  public void fly() {
    // Flight implementation
  }

  public void eat() {
    // Eating implementation
  }

  public void sleep() {
    // Sleep implementation
  }
}

Input

Each line contains one of the bird's action: fly, eat or sleep.

Output

For each bird's action print in a separate line the corresponding output.

Examples

Example 1

Loading
Loading