'use strict'

class Ball {

   constructor(name) {
       this.name = name;
   }

   catchPokemon() {
       console.log(`${this.name} threw.`);
   }
}

class PokeBall extends Ball {
   constructor() {
       super("Poke Ball");
   }
}

class GreatBall extends Ball {
    constructor(){
        super("Great Ball");
    }
}

let pokeBall = new PokeBall();
pokeBall.catchPokemon();

let greatBall = new GreatBall();
greatBall.catchPokemon();
'use strict'

class Ball {

   constructor(name) {
       this.name = name;
   }

   catchMonster() {
       console.log(`${this.name} threw.`);
   }
}

class MonBall extends Ball {
   constructor() {
       super("Poke Ball");
   }
}

class SuperBall extends Ball {
    constructor(){
        super("Great Ball");
    }
}

let monBall = new MonBall();
mokeBall.catchMonster();

let superBall = new SuperBall();
superBall.catchMonster();
Update to avoid copyright issue
Update to avoid copyright issue
