| ||||||||||
When you create a method in a subclass that overrides a method from the superclass, how do you invoke the superclass method's behavior? What constraints are there for doing this in a constructor of a subclass?...... |
Wouldn't you just cast 'this' to the superclass? What are the constraints?? |
Question: So if you had 'public class Agent extends Turtle, and inside of that class there's a method like this: public Agent (int x, int y, ModelDisplay modelDisplayer, Simulation thisSim) { // let the parent constructor handle it super(x,y,modelDisplayer); init(thisSim); } |
Question: for the rewriting of the DrawableNode class question, since LLNode can do everything DrawableNode can, wouldn't you just need this?:public class DrawableNode extends LLNode{ } |