Mickey Marshall

Mickey Marshall

  • 2.1k
  • 14
  • 196

Inheritance or reverse Inheritance

Nov 30 2021 2:11 PM

I would like to understand if class inheritance can be used to solve my problem.
Theoretically, I have two simle objects that have all the same abilities as each other but the syntax for accessing each ability is different from object to object.
I would like tohave two classes that have all the same function but different sybtax within the functions. This is of course, ot a problem. I want the user to tell the app tat he is using object A or B today and the app the chooses class A or Band runs seemlessly.
How can I do this?
Thanks for your time

Mickey


Answers (2)