You can do this by thinking in the opposite direction, however it depends on the situation. If you want your classes to be separated, no one can give you a good answer on how to structure your objects and inheritance unless you give us more information. Also keep in mind that worrying too much about getting the right class structure is a burden for small projects, and you can simply move these methods and execute them and then learn more about classes later.
fabspro
source share