LinePrinter class implemented