Created
November 13, 2014 20:33
-
-
Save alexshavelev/8947ce00d07cc963e3dc to your computer and use it in GitHub Desktop.
level13.lesson04.task04;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javarush.test.level13.lesson04.task04; | |
import java.awt.*; | |
/* Класс BigFox | |
1. Исправь класс BigFox так, чтобы программа компилировалась. | |
2. Метод main менять нельзя. | |
*/ | |
public class Solution | |
{ | |
public static void main(String[] args) throws Exception | |
{ | |
Fox bigFox = new BigFox(); | |
System.out.println(bigFox.getName()); | |
System.out.println(bigFox.getColor()); | |
} | |
public interface Animal | |
{ | |
Color getColor(); | |
} | |
public static abstract class Fox implements Animal | |
{ | |
public String getName() { | |
return "Fox"; | |
} | |
} | |
//add your code below | |
public static class BigFox extends Fox | |
{ | |
/*public Color () { | |
return Color.GRAY; | |
} */ | |
@Override | |
public Color getColor() | |
{ | |
return Color.GRAY; //To change body of implemented methods use File | Settings | File Templates. | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment