Skip to content

Instantly share code, notes, and snippets.

@vorant94
Created March 10, 2024 07:09
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 vorant94/7072cb444aa9d56ae1217151d598cdde to your computer and use it in GitHub Desktop.
Save vorant94/7072cb444aa9d56ae1217151d598cdde to your computer and use it in GitHub Desktop.
abstract class Animal {
abstract move(): void;
}
class Mammal extends Animal {
move() {
// Move in 2d space
}
}
class Ave extends Animal {
move() {
// Move in 3d space
}
}
class Dog extends Mammal {}
class Crow extends Ave {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment