Created
December 12, 2016 10:19
-
-
Save greensma/43ec08dbb0bdc7a20f4b7fd5ea6b904a to your computer and use it in GitHub Desktop.
Task8
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
public class Main { | |
static Strauss strauss; | |
static Vorobei vorobei; | |
public static void main(String[] args) { | |
Strauss strauss = new Strauss(); | |
Strauss.dvijenie = "Бегу"; | |
strauss.dvijenie(); | |
Vorobei vorobei = new Vorobei(); | |
vorobei.dvijenie = "Лечу"; | |
vorobei.dvijenie(); | |
System.out.println(""); | |
} | |
} | |
/* далше классы и объединяющий | |
public class Strauss extends Bird{ | |
public void dvijenie() { | |
System.out.println("Бегу"); | |
} | |
} | |
public class Vorobei extends Bird{ | |
public void dvijenie() { | |
System.out.println("Лечу"); | |
} | |
} | |
public class Bird { | |
public static void bird(String name, dvijenie) { | |
super (name, dvijenie); | |
} | |
@Override | |
public void dvijenie() { | |
System.out.println(""); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment