help understanding something
do I always have to write all the methods in the abstract class first then override them in the classes that inherit from it? Or is there a way to leave the abstract class empty and only create the methods in the subclasses
6 Replies
Feel free to define methods in a subclass which aren't defined in the abstract class... But, then someone who just has a variable which has the type of the abstract class won't know that those methods exist
oh
I see now
so when that error happens I need to define the method in the parent class
Well, you define a method in the parent class when you want people who have a variable whose type is the parent class to be able to access it
I understand now, thank you for your help
š