StringPrinter class implemented