Make a helper class for toString method

I made a helper class which is used in toString methods of user defined objects.