Moved receipt output factory to the Driver class to add flexibility to the program