0

Can anyone help me in this code?

I want to redefine the method paymentDetails() and print that the payment is in cash. This text I have store in inherited class ClassPayment and have to make use of constructor also in this class. https://code.sololearn.com/capTupwK3LFS/?ref=app

30th May 2020, 2:26 PM
vinay kumar singh
vinay kumar singh - avatar
4 Answers
+ 1
I'm still not clear but have tried to do something similar. Let me know if this isn't what you are looking for. https://code.sololearn.com/ck8W34xosHh3/?ref=app
30th May 2020, 3:32 PM
Avinesh
Avinesh - avatar
0
Anyone there to review it??
30th May 2020, 2:51 PM
vinay kumar singh
vinay kumar singh - avatar
0
Redefining a method and overriding a method are two different things. Generally static methods are redefined because they are not inherited. Also do you mind explaining what should your paymentDetails method will print?
30th May 2020, 3:12 PM
Avinesh
Avinesh - avatar
0
Avinesh class classPayment should redefine the paymentDetails method to indicate that the payment is in cash with appropriate constructor.
30th May 2020, 3:15 PM
vinay kumar singh
vinay kumar singh - avatar