public class Starship {
@Override
public String toString() {
return "I'm a Spaceship!";
}
}
public abstract class Animal {
public abstract void breathe();
}
public class Dog extends Animal {
public void breathe() {
//breathe stuff
}
}
public interface Feedable {
public void feed(String food);
}
public class Dog implements Feedable {
public void feed(String food) {
//feed implementations
}
}