Separate print() and toString() functionalities by overriding toString()