Question about OOP

hello! i`ve a deep question: imagine that you have objects (maybe an ellipse) and differents behaviors (move up, down, left, rigth) what would be the best way to program in a OOP paradigm? using interfaces? i mean, i would like to apply some behavior to objects in differents moments, but i want to keep them in a separate class. Thanks!

It really depends on exactly what you’re trying to do.

Also note that there is never a “best” way to program anything. It’s always about trade-offs and deciding what you care about most.

Can you please put together a simple example that shows what you’re trying to do?

You might find this thread interesting: