Initial commit
This commit is contained in:
parent
22a8c2be3c
commit
9491264c7c
@ -19,7 +19,7 @@ public class Bear extends Carnivorous implements Run, Voice {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Voice getVoice(){
|
public String getVoice() {
|
||||||
return "гррр";
|
return "гррр";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,7 +39,7 @@ public class Duck extends Herbivore implements Run, Swim, Fly, Voice {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Voice getVoice(){
|
public String getVoice(){
|
||||||
return "кря";
|
return "кря";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ public class Kotik extends Carnivorous implements Run, Voice {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Voice getVoice(){
|
public String getVoice(){
|
||||||
return "мяу";
|
return "мяу";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ public class Sheep extends Herbivore implements Run, Voice {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Voice getVoice(){
|
public String getVoice(){
|
||||||
return "бее";
|
return "бее";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
package animals;
|
package animals;
|
||||||
|
|
||||||
public interface Voice {
|
public interface Voice {
|
||||||
Voice getVoice();
|
String getVoice();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user