OOP Garage
This is a basic project with 3 vehicles to demonstrate my understanding of OOP principles. The 3 vehicles (Convertible, Tank, Bus) all inherit from a parent class (VehicleController), demonstrating inheritance. I was able to abstract shared functionality like movement and honking into the parent class, keeping the child classes clean and focused only on what's unique (such as setting their speed). Polymorphism is used by defining the Move() and Honk() methods as virtual in the base class and overriding them in the children when needed. Even though all three vehicles currently share the same honk logic, the structure allows each vehicle to implement its own unique behaviour through overrides. I used encapsulation by keeping important fields like speed and Rigidbody private or protected and accessing them through public properties. This ensures values are safely constrained (e.g., using Mathf.Clamp) and only modified in controlled ways. https://github.com/Z1Colo/Prog-Theory-Repo-3