Birds can fly in the sky—no surprises, right? But do all birds fly in the same way? Maybe not. Some flap quickly, others glide for long distances, and some don’t fly at all (hello, ostrich!). So, why am I talking like this? Well, here lies an important concept in Object-Oriented Programming (OOP), and that is: Polymorphism.
This is my basket where I write down what I’m figuring out as I learn software development—thoughts, experiments, and projects I tinker with. Just notes from my messy middle. If you’re curious, peek inside! Maybe we’ll stumble on the same “aha!” moments, or you’ll find something useful for your own path.
My Thoughts
Learning never stops, and the best way to grow is to share.
- The title has already conveyed so much. In web development with Laravel or a PHP environment, we often need to use the same method across multiple classes. Suppose we are creating a vehicle rental system that includes various types of vehicles. We can consider a base class named Vehicle, which can be extended to encompass different kinds of vehicles as child classes.
- We all depend on something. From the moment we wake up, we rely on our alarm clock, coffee machine, or phone to start the day. Software systems are no different - they depend on services like databases, payment gateways, or email providers to function. But as applications grow, managing these dependencies becomes complex.