Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. // Interface
  2. interface BlackColor{
  3. feed(): string
  4.  
  5. }
  6. interface fourLegs {
  7. pet(): string
  8. }
  9.  
  10. // Class GrandParents
  11. class Animal {
  12. photo(): string {
  13. console.log('smile to the photo');
  14. }
  15. }
  16.  
  17. // class Parents
  18. class Cat extends Animal implements fourLegs {
  19. pet(): string {
  20. console.log("you can pet them");
  21. }
  22.  
  23. sound(): string {
  24. console.log('can Meaoouuuw');
  25. }
  26. }
  27.  
  28. // Class son
  29. class EuropeanCat extends Cat implements BlackColor {
  30. color: string;
  31. }
  32. // Class son
  33. class ChartreuxCat extends Cat {
  34. }
  35.  
  36. //class Parents
  37. class Dog extends Animal implements fourLegs {
  38. pet(): string
  39. }
  40. sound():string {
  41. console.log('can bark');
  42. }
  43.  
  44. //class son
  45. class TerreNeuveDog extends Dog implements BlackColor {
  46. feed(): string {
  47. console.log("you have to feed them");
  48. }
  49. }
  50.  
  51. // class son
  52. class MoonMoonDog extends Dog {
  53.  
  54. }
  55.  
  56. // class Parents
  57. class Birds extends Animal {
  58. fly(): string {
  59. console.log('can fly')
  60. }
  61. }
  62.  
  63. //class son
  64. class Mesange extends Birds {
  65.  
  66. }
  67.  
  68. //class son
  69. class Merle extends Birds implements BlackColor{
  70. feed(): string {
  71. console.log("you have to feed them");
  72. }
  73.  
  74. }
  75.  
  76. //class Parent
  77. class Fish extends Animal{
  78. swim(){
  79. console.log('can swim') }
  80. }
  81.  
  82. //class Son
  83. class Thon extends Fish {
  84.  
  85. }
  86. class son
  87. class Shark extends Fish {
  88.  
  89. }
  90.  
  91. class Worm extends Animal {
  92.  
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement