Hello, I am currently a bit stuck on a problem with inheritance.
Basically I have 5 classes...
Bike that inherits Vehicle
Car that inherits Vehicle
Commercial that inherits Vehicle
Now as you may have guessed, Bike/Car/Commercial were created because they have a few extra methods/instance variables that vehicle does not.
Within the class Registration, I make an array of type Vehicle. Within this array, I put in different kinds of types that inherit Vehicle such as car, bike, and commercial. If I want to call methods from things within the array however, I can only access the methods from the base class Vehicle (Which makes sense to me as it's an abstract concept).
What is the best way around this?