CJCoding With Joseph
15per day

Extend a Dog from Animal

A base class Animal is provided with a name field and a speak() method that returns "...". Complete the Dog class so it extends Animal.

Requirements:
1. Call the parent constructor with the given name using super().
2. Override speak() to return "Woof".

Do NOT write a main method. Your class will be tested by a hidden Main class.

Expected Output:

Buddy
Woof
Topics:
InheritanceClasses
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (sysout, psvm, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.