I\'m trying to get the hang of inheritance in Java and have learnt that when overriding methods (and hiding fields) in sub classes, they can still be accessed from the super
It is advised that further changes to the inherited class will not necessitate addition of the super qualifier and also prevent errors if missed.
You are doing the right way by not using the super
keyword for accessing getTyreCost
.
But you should set your members private and only use the getter method.
Using super
keyword should be reserved for constructors and overridden methods which need to explicitly call the parent method.