Advertisement
maher11

Abstract dart

Nov 2nd, 2018
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 1.06 KB | None | 0 0
  1. abstract class Animal {
  2.   void breathe(); // concept or abstract method
  3.  
  4.   void makeNoise() {
  5.     print("Random ass animal noise");
  6.   }
  7. }
  8.  
  9. class Person implements Animal {
  10.   String name, nationality;
  11.  
  12.   Person(this.name, this.nationality);
  13.  
  14.   @override
  15.   void breathe() {
  16.     print("person breathing through his ass");
  17.   }
  18.  
  19.   @override
  20.   void makeNoise() {
  21.     print("person shouting 'niggeeeeeeeeeeeer'");
  22.   }
  23.  
  24.   @override
  25.   String toString() => "$name $nationality";
  26. }
  27.  
  28. class Comedian extends Person implements IsFunny{
  29.   Comedian(String name, String nationality) : super(name, nationality);
  30.  
  31.   @override
  32.   void makePeopleLaugh() {
  33.     print("Comedian licking his butthole to make people laugh");
  34.   }
  35.  
  36. }
  37.  
  38. abstract class IsFunny {
  39.   void makePeopleLaugh();
  40. }
  41.  
  42. class TVShow implements IsFunny{
  43.  
  44.   String name;
  45.  
  46.   @override
  47.   void makePeopleLaugh() {
  48.     print("|dope ass nude scene makes people laugh");
  49.   }
  50.  
  51. }
  52.  
  53. main(List<String> arguments) {
  54.   var jenny = new Person("Jenny", "Uranus");
  55.   print(jenny.name);
  56.   print(jenny);
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement