Challenge: Polymorphism
Task
You are given a Parent class and a Child class that inherits from the Parent class. Your task is to override the parent method named method in the Child class so that it returns "This is the overridden method!".
Next, you need to overload this method by adding a parameter int parameter so that the method returns: "This is the overloaded method with int parameter: " + parameter.
Note that the methods should return these values, not display them on the screen!
Feel free to use the "Hint" and "Solution" buttons if you have difficulties understanding the task.
Please do not modify the Parent class!
Bedankt voor je feedback!
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Geweldig!
Completion tarief verbeterd naar 3.57
Challenge: Polymorphism
Veeg om het menu te tonen
Task
You are given a Parent class and a Child class that inherits from the Parent class. Your task is to override the parent method named method in the Child class so that it returns "This is the overridden method!".
Next, you need to overload this method by adding a parameter int parameter so that the method returns: "This is the overloaded method with int parameter: " + parameter.
Note that the methods should return these values, not display them on the screen!
Feel free to use the "Hint" and "Solution" buttons if you have difficulties understanding the task.
Please do not modify the Parent class!
Bedankt voor je feedback!