This is not so much an error, but there is a feature of Java that we
(and the AW) book haven't discussed, which you may find useful for
writing the eval method on AddExpressions.  It is sometime useful
with inheritance to be able to ask whether an object is in some
class, since you don't necessarily know it's dynamic type.  For example,
in eval, it's useful to know if you have IntValue or StringValue.
One way of doing this it to cast a Value down to a StringValue
first, and if that fails, you catch the exception that is thrown
and then try casting to IntValue.  This will work, and doesn't
require any new features of Java that you haven't seen.  It's fine
if you want to write it that way.

Java has some special support to make something like the eval
method cleaner.  It is called "instanceof".  Here is an example
taken from Arnold and Gossling.  Assume you have the following
inheritance hierarchy:

       Coffee
      /      \
   Mocha     Latte

You could "instanceof" to ask whether some Coffee object is 
really a Mocha, e.g.:

  public void quaff(Coffee joe) {
     if (joe instanceof Mocha) {
        Mocha fancy = (Mocha) joe;
        ... do something that uses Mocha-specific methods
     }

As you can see, it would be possible do to this with 
the cast, of (Mocha) joe without the instanceof, but
you'd need to have some try/catches around to keep
the program from aborting if you guess the wrong case
first.