In a class diagram, you don't show the act of instantiation. That is something that a sequence or communication diagram would show. Class diagrams show the static structure of a system.
If a class A "depends on" a class B, then you could look at the association and dependency relationships. Dependency is the weaker of the two and is usually used if the other class is a parameter to a method and is not stored as an instance variable. Association is stronger and means that class A contains an instance (or instances) of class B, and is further strengthened by the composition and aggregation relations.
In your example, alpha
isn't part of a class. If alpha
was an instance variable in some class C
, you would connect C
to A
with an association. If it was a parameter to a method or created inside a method of C
and not stored as an instance variable, you would use a dependency line to connect C
to A
. In all cases, you have the ability to specify directionality and multiplicity.
I think a larger problem is that you appear to be associating UML with "class diagram". The UML 2.2 specification has 14 diagram types. There are 7 structural diagrams, and 7 behavioral diagrams (broken down into 3 behavior diagrams and 4 interaction diagrams). Each diagram shows a particular view of the system. Some aspects of the system are best shown using a particular diagram, or in some cases, a series of diagrams. If you are interested, I would recommend checking out Wikipedia's entry on UML and Martin Fowler's UML Distilled. Both give great overviews of the purpose, strengths, and weaknesses of various diagram types.