What appears in the "other" fields is not something that was graded, since you really would not know what should go there until you wrote the compiler. However, in the notes below I've provided some examples of what might appear:
A couple other notes:
Scope | Close? | Other |
---|---|---|
addr | yes | struct |
worker | yes | struct |
... remainder of scope stack ... |
Note that I've indicated that the scope is closed for both "worker" and "addr". The reason is that in a struct reference, such as we have here, if the field is not declared in the immediately enclosing struct, then it is an error. For example, if the reference were employee->address->name, the compiler should raise an error, because name is not declared in the "addr" struct. By stating that the scope is "closed", the compiler will not be able to probe deeper into the stack for name, and it will be forced to raise an error.
Rectangle BoxObject GraphicalObject ... Remainder of Scope Stack ...In order to make it possible to create these scope records, we need to be able to follow the super class chain for Rectangle. This suggests that the "other" field for a class must minimally maintain: