Created
January 26, 2019 15:48
-
-
Save ajaysjournal/3a2005577452bbb26a9577aa9f919eab to your computer and use it in GitHub Desktop.
solid-blog
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
interface Robot { | |
// very common features, every client must implement are below. | |
void run(); | |
void walk(); | |
} | |
interface ShootingRobot extends Robot { void shoot(); } | |
interface SwimmingRobot extends Robot { void swim(); } | |
interface FightingRobot extends Robot { void fight(); } | |
class SpeakingRobot implements Robot{ | |
void speak() { | |
// code to speak | |
} | |
@Override | |
public void run() { | |
// code to run | |
} | |
@Override | |
public void walk() { | |
// code to walk | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment