I’m still learning how to use classes and I was wondering when should I use the extends keyword (extend a class).
Let’s say I have a class that does thing A (and it’s a singleton). Is it ok to extend it to another one that does thing B, even if class B is not really related to class A, but it uses a lot of its methods? Or should I create a new class?
Extends should be for example used if you want to access private variables by both classes.
If you could show your work, we could tell you what should/shouldn’t you do.