Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Penguin extends Animal{
- public int maximumTemperature;
- public Penguin(int cell, int temp) {
- super(Penguin.class.getSimpleName(), cell);
- maximumTemperature = temp;
- }
- @Override
- public void move(String from, String to) {
- System.out.println("Swimmed from " + from
- + " to " + to);
- }
- @Override
- public void eat() {
- System.out.println("Eats fish");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement