You should note that key values are passed to functions using
objects (an abstract class).
The contents of a key should be interpreted using the
The key can be either a string(attrString) or an integer(attrInteger),
as per the definition of AttrType in global package. We just
implement these two kinds of keys in this assignment.
If the key is a string, its value is stored in a
which extends the
KeyClass . Likewise, if the key is an integer,
its value is stored in a
IntegerKey class that also extends
Although using the above structure, keys can be of (the more general enumerated) type AttrType, you can return an error message if the keys are not of type attrString or attrInteger.
The BTSortedPage class, which augments the
insertRecord method of HFPage by storing
records on a page in sorted order according to a specified key value,
assumes that the key value is included as the initial part of each
record, to enable easy comparison of the key value of a new
record with the key values of existing records on a page.