Skip to content

Instantly share code, notes, and snippets.

@ajaysjournal
Created January 26, 2019 15:48
Show Gist options
  • Save ajaysjournal/3a2005577452bbb26a9577aa9f919eab to your computer and use it in GitHub Desktop.
Save ajaysjournal/3a2005577452bbb26a9577aa9f919eab to your computer and use it in GitHub Desktop.
solid-blog
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