Centroid class added which is a specialization of Instance. It supports
the modification of it's attributes. Modified the code to support this
new class.

In Instance class changed the attributes modifier from private to
protected. This way, the Centroid class can directly change it's parents
attribute.