Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. public interface Human {
  2. void Eat();
  3. void Run();
  4. }
  5.  
  6. public class Man : Human {
  7. public void Eat() {
  8. //eat code
  9. };
  10.  
  11. public void Run() {
  12. //run code
  13. }
  14. }
  15.  
  16. public class Baby : Human {
  17. public void Eat() {
  18. //eat code
  19. }
  20.  
  21. //babies can not run so what??
  22. //NotImplementedException fired
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement