Last active
March 1, 2021 02:11
-
-
Save ThiagoBarradas/24eccdcb162e8a54200cdf8cb6a2f9a9 to your computer and use it in GitHub Desktop.
SOLID [I] - Interfaces Example with Inheritance
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 interface IMovable | |
{ | |
void Move(long x, long y, long z); | |
} | |
public interface IHuman : IMovable | |
{ | |
string Name { get; set; } | |
string Document { get; set; } | |
long Age { get; set; } | |
void Speak(string message); | |
} | |
public interface IAnimal : IMovable | |
{ | |
string Name { get; set; } | |
string Type { get; set; } | |
void EmitSound(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment