Chapter 5 Print and Summary Methods
Every class should have a
printmethod that gives a concise description of the object.The
printmethod should invisibly return the original object.The number of significant digits should be an option and should use the global default.
Printing the call is discouraged.
summarymethods are helpful but not required. These should create more verbose descriptions of the object. Theprintmethod for thesummaryobject should follow the bullet-pointed remarks above for printing.