0

Help with question

Fill in the blanks to define a "Father" class with a final method useMoney() that cannot be overridden in its "Son" subclass. Class Father{ final function useMoney() { echo "wisely"; } } class Son ????Father { public function sayHi() { }

17th Apr 2019, 3:13 AM
Debbie Swatzell
10 Réponses
+ 4
I hope you answer:final class extends
18th Jun 2020, 2:53 AM
Joynal Abdin
Joynal Abdin - avatar
+ 2
Always remember " final methods cannot be overridden but can be overloaded."
19th Apr 2019, 5:25 AM
Ananya Pandey
Ananya Pandey - avatar
+ 2
class Father { final function useMoney() { echo "wisely"; } } class Son extends Father { public function sayHi() { echo "Hi!"; } }
22nd Apr 2019, 3:06 PM
Orna
Orna - avatar
0
class Father { final function useMoney() { echo "wisely"; } } class Son extends Father { public function sayHi() { echo "Hi!"; } }
14th Sep 2019, 10:11 PM
Jean de Dieu RUMANZI
Jean de Dieu RUMANZI - avatar
0
class Father { final function useMoney() { echo "wisely"; } } class Son extends Father { public function sayHi() { echo "Hi!"; } }
7th Nov 2020, 12:33 PM
Mohamed jmail ben abdallah
0
class Father { final function useMoney() { echo "wisely"; } } class Son extends Father { public function sayHi() { echo "Hi!"; } }
14th Jun 2021, 8:12 AM
Nabeel Tariq
Nabeel Tariq - avatar
0
Here is the solution: class Father { final function useMoney() { echo "wisely"; } } class Son extends Father { public function sayHi() { echo "Hi!"; } }
23rd Aug 2021, 11:43 AM
Owethu Sotomela
Owethu Sotomela - avatar
0
31st Aug 2021, 1:23 PM
Maimouna DIALLO
0
final , class and extends
17th May 2022, 8:04 AM
Megha Raj kandel