YES EXACTLY! I understand all of that! But what I don't understand is this:
because you're now using a MachoMan variable, you no longer have access to additional methods/variables that the MiniMan class made available.
Exactly! So The ComboMan variable doesn't have the y field.
I understand that since it's type MachoMan but set equal to MiniMan, it'll have the methods/variables of MachoMan, but what MiniMan has implemented for them.
But MiniMan's implementation of MachoMan's changex() method changes the y field too. But ComboMan doesn't have the y field so the MiniMan's changex() method in ComboMan shouldn't work. But it's still working no problem and I don't understand that.
because you're now using a MachoMan variable, you no longer have access to additional methods/variables that the MiniMan class made available.
Exactly! So The ComboMan variable doesn't have the y field.
I understand that since it's type MachoMan but set equal to MiniMan, it'll have the methods/variables of MachoMan, but what MiniMan has implemented for them.
But MiniMan's implementation of MachoMan's changex() method changes the y field too. But ComboMan doesn't have the y field so the MiniMan's changex() method in ComboMan shouldn't work. But it's still working no problem and I don't understand that.
