I understand how to call superclass variables from a subclass. But what if I wanted to call subclass variables from the superclass. Or even sub subclass variables (a subclass inside a subclass of the superclass) from a superclass. I want to reach down the Hierarchy for variables as opposed to reaching up (like when using super). How do I do that? Or is it not possible because the super class can't inherit any of the subclass variables? I'll use examples from the program i've been working on. I know there's supposed to be more code but I just slapped that together.
Hi When you modify a variable of Threat from Virus,in fact you modify a variable of Virus itself,because Virus instances do have all variables of Threat. But speaking about a Threat instance,Virus is completely stranger whom it knows nothing about.