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!
Do not modify the transform() method and do not edit the fields.
Takk for tilbakemeldingene dine!
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Fantastisk!
Completion rate forbedret til 3.57
Challenge: Interface
Sveip for å vise menyen
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!
Do not modify the transform() method and do not edit the fields.
Takk for tilbakemeldingene dine!