Implemented Template Method Pattern

Implemented Template Method Pattern