Tuesday, July 16, 2002 07:52 AM
Class diagrams are for static structure. This means type/structure declarations (package, static, class, members, "A myvara"). Local variables, runtime execution, dynamic assignment and instantiation of new class instances (e.g. "myvara = new B()"), are not part of static structure, so they play no role in a class diagram.
If you were doing a class diagram involving the static structure of class B, then of course you would show the association/generalization, that class B extends/implements/inherits from interface A.
If you were doing some dynamic modelling, in a Collaboration or State or Activity diagram, then it might be significant to the model, to show the involvement and behavior of an object of type B.