Skip to content

Instantly share code, notes, and snippets.

@fermopili
Created March 19, 2017 12:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fermopili/1fc60d6b9013a80cd16df12224d95728 to your computer and use it in GitHub Desktop.
Save fermopili/1fc60d6b9013a80cd16df12224d95728 to your computer and use it in GitHub Desktop.
com.javarush.task.task13.task1311
/*
Переводчик с английского
*/
public class Solution
{
public static void main(String[] args) throws Exception
{
EnglishTranslator englishTranslator = new EnglishTranslator();
System.out.println(englishTranslator.translate());
}
public static abstract class Translator
{
public abstract String getLanguage();
public String translate()
{
return "Я переводчик с " + getLanguage();
}
}
public static class EnglishTranslator extends Translator
{
public String getLanguage()
{
return "английского";
}
;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment