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
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
0
Anyone there to review it??
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?
0
Avinesh class classPayment should redefine the paymentDetails method to indicate that the payment is in cash with appropriate constructor.