diff --git a/exercises/classes/exo.js b/exercises/classes/exo.js index c8765c4..d18264a 100644 --- a/exercises/classes/exo.js +++ b/exercises/classes/exo.js @@ -1,7 +1,33 @@ class Cat { + + constructor(name) { + this.name = name; + } + + meow() { + console.log('meow'); + } + + play() { + console.log('play'); + } } -class MainCoon { +class MainCoon extends Cat { + + constructor(name, color) { + super(name); + this.color = color; + } + + play() { + super.play(); + console.log('Super play'); + } + + sleep() { + console.log('Super sleep') + } } module.exports = {Cat, MainCoon};