Updated the Logic Gates exercise

Handling OOP