Code improvements

I have added one private variable $format and a setFormat function to change the format.
Changed the if condition in report to switch case [For a cleaner approach and handling]