Create a class called Animal
that has a constructor method that takes one argument: species
. It should have a getter for species and a method called makeSound()
that logs a sound the animal makes. Create a subclass called Cat
that extends the Animal class. Add a method to the Cat class called purr()
that logs purr
to the console. Create a subclass called Dog
that extends the Animal class. Add a method to the Dog class called bark()
that logs woof
to the console.