Inheritance allows a class to derive features from another class. The extends keyword is used for this.
Dog that extends Animal (Animal is pre-defined for you in the background setup, but you need to redefine it or assume it exists. For this script, define both or just Dog if you can)Animal first (copy from previous if needed) then DogDog should override speak() to return "[name] barks."myDog instance named "Buddy"myDog.speak()Submit your code to see test results