OOP principles with example