(1) Complete code is converted into Object-oriented model
(2) printing is converted to 'logging'