class Animal implements Zvuky { // ?co to ted udela? String type ; Animal() { type = "animal ";} public String sounds() { return "not known";} void prnt() { System.out.println(type + sounds());} } class Dog extends Animal implements Zvuky { Dog() { type = "dog "; } public String sounds() { return "haf"; } } class Cat extends Animal implements Zvuky { Cat() { type = "cat "; } public String sounds() { return "miau"; } } public class RAnim { public static void main(String [] args) { Animal notknown = new Animal(); Zvuky z = new Animal(); Dog filipes = new Dog(); Cat tom = new Cat(); System.out.println(z.sounds()); z = filipes; System.out.println(z.sounds()); // tom.prnt(); // filipes.prnt(); // notknown.prnt(); } }