Defining Methods on Unions
¥Assume that we want to define a method on a union.  The method will typically require a separate implementation for each variant (subclass) of the union.   But each implementation will  satisfy the same "contract" (description of behavior).
¥In Java, the method must not only be defined in each variant of the union, it must be declared as abstract in the root class of the union hierarchy. Otherwise, Java will not allow the method to be invoked on objects of the union type.