Made collection class abstract.

Made collection class abstract and added __toString() magic method and
added abstract toString() function (for child classes to implement).