Challenge: Interface
Task
For you, two interfaces have been created: Human
and Animal
, as well as one class β Werewolf
.
Your task is to inherit both interfaces in the Werewolf
class and then implement their methods. In the Werewolf
class, the comments above indicate how you should override these methods. A werewolf is both a human and an animal, so it has a method called transform()
. You should also use the boolean value isHumanForm
in the methods as instructed.
If the task seems difficult, feel free to use the Hint and Solution buttons to analyze the solution!
Thanks for your feedback!
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 4.76
Challenge: Interface
Swipe to show menu
Task
For you, two interfaces have been created: Human
and Animal
, as well as one class β Werewolf
.
Your task is to inherit both interfaces in the Werewolf
class and then implement their methods. In the Werewolf
class, the comments above indicate how you should override these methods. A werewolf is both a human and an animal, so it has a method called transform()
. You should also use the boolean value isHumanForm
in the methods as instructed.
If the task seems difficult, feel free to use the Hint and Solution buttons to analyze the solution!
Thanks for your feedback!