Extend the handling of field names in Fig. 6.18 to classes and single-inheritance class hierarchies. a) Give an implementation of class Env that allows linked symbol tables, so that a subclass can...


Extend the handling of field names in Fig. 6.18 to classes and single-inheritance class hierarchies.


a) Give an implementation of class Env that allows linked symbol tables, so that a subclass can either redefine a field name or refer directly to a field name in a superclass.

b) Give a translation scheme that allocates a contiguous data area for the fields in a class, including inherited fields. Inherited fields must maintain the relative addresses they were assigned in the layout for the superclass.


Fig. 6.18



May 22, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here