In a uml diagram, a line with an open arrowhead from a subclass to a superclass indicates

UML key Points / Notes

1) Inheritance is indicated by a solid line with a closed, unfilled arrowhead pointing at the
super class

2) Abstract class is indicated by italic notation.

3) By default all the assotiations are bidirectional this means that both classes are aware of each other and their relationship. A bi-directional association is indicated by a solid line between the two classes.

4) A uni-directional association is drawn as a solid line with an open arrowhead (not the closed arrowhead, triangle, used to indicate inheritance) pointing to the known class.

 5) a dotted line with a closed, unfilled arrow means realization (or implementation)

A very important concept in object-oriented design, inheritance, refers to the ability of one class (child class) to inherit the identical functionality of another class (super class),
Inheritance is indicated by a solid line with a closed, unfilled arrowhead pointing at the
super class

Below both the diagram shows the same concept of inheritance in UML. If you look care fully BankAccount class in the diagram is shown with ITALIC format. It implies that this class is an abstract class and withdrawl(int amount) method is abstract method.

In a uml diagram, a line with an open arrowhead from a subclass to a superclass indicates

An example of inheritance using tree notation

 There are five types of associations. 1) bidirectional associations
2)uni-directional associations

1) bidirectional associations

             By default all the assotiations are bidirectional this means that both classes are aware of each other and their relationship. A bi-directional association is indicated by a solid line between the two classes.  At either end of the line, you place a role name and a multiplicity value.  The multiplicity value next to the Plane class of 0..1 means that when an instance of a Flight exists, it can either have one instance of a Plane associated with it or no Planes associated with it (i.e., maybe a plane has not yet been assigned).

Indicator Meaning

1) 0..1  (Zero or one)
2) 1 (One only)
3) 0..* (Zero or more)
4) * (Zero or more)
5) 1..* (One or more)
6) 3 (Three only)
7) 0..5 (Zero to Five)
8) 5..15 (Five to Fifteen)

2) Uni-directional association

In a uni-directional association, two classes are related, but only one class knows that the relationship exists. 

An example of a uni-directional association: The OverdrawnAccountsReport class knows about the BankAccount class, but the BankAccount class does not know about the association

In java term, An instance of report class can exist which can use AccountClass object, but vice versa is not true, i.e. If AccountClass object is created it may not user report class object.

                A uni-directional association is drawn as a solid line with an open arrowhead (not the closed arrowhead, or triangle, used to indicate inheritance) pointing to the known class. Like standard associations, the unidirectional association includes a role name and a multiplicity value, but unlike the standard bi-directional association, the uni-directional association only contains the role name and multiplicity value for the known class. In our example , the OverdrawnAccountsReport knows about the BankAccount class, and the BankAccount class plays the role of "overdrawnAccounts." However, unlike a standard association, the BankAccount class has no idea that it is associated with the OverdrawnAccountsReport.

==========================

What is realization in UML 

==========================

In the diagram shown , both the Professor and Student classes implement the Person interface and do not inherit from it. We know this for two reasons: 1) The Person object is defined as an interface — it has the "«interface»" text in the object's name area.

2) We know inheritance is not being shown here, because the line with the arrow is dotted and not solid. As shown a dotted line with a closed, unfilled arrow means realization (or implementation),

Ralization ==> The String class does not implement any thing for sortable interface.

=================================================

 Composition Relationships== IS MADE UP OF

=================================================

Case 1) Each instance of type Circle seems to contain an instance of type Point. Composition is shown by Dark Arrohead at parent class. If Objects of Circle class get deleted, then all the objects of Point will also get deleated.

Case 2)  Address book is made up of / contains contacts, and contact group. You can have contact to be part of many groups. In case if AddressBook object get deleted then ALL contact and ContactGroup objects will be deleted. But if only ContactGroup object is deleted then as Contact can be part of many ContactGrups , it will not be deleted.

Here we can see Strong Composition between AddressBook and Contact, ContactGroup objects, but at the same time ContactGroup is made up of Contact, but they have weak composition which is been shown with hollow white arrowHead marked toward parent class.

Composition can be recursive. i.e. ContactGroup is madeup of Contacts as well as other ContactGroup. There is weak composition between contactGroup with itSelf.

What is subclass and superclass in UML?

The most inclusive class in a generalization/specialization is called the superclass and is generally located at the top of the diagram. The more specific classes are called subclasses and are generally placed below the superclass.

Which UML relationships should be used between a subclass and a superclass?

Another special relationship is the relationship between a subclass and a superclass. This relationship is shown with the generalization arrow.

What is superclass and subclass in class diagram?

The derived class (the class that is derived from another class) is called a subclass. The class from which its derived is called the superclass. In fact, in Java, all classes must be derived from some class.

What does a dashed line mean in UML?

An association between classes or interfaces implies a dependency that involves an object reference connecting two objects. Other types of dependencies are possible. A dashed line with an open arrowhead is used to indicate a dependency in the more general sense. Figure 15 shows an example of such a dependency.