I've been studying java a little bit and I've come upon a problem I couldn't solve (I did research but since it's a pretty specific question no answer was found):
I'm trying to add variables and methods that would be inherited by classes in the same way an interface does it (have a class inherited by different classes that already have an ancestor, i.e.: Actor extends Character and Weapon extends Item, I need both Actor and Weapon to have XY coordinates, width/height and move() method)
At first I thought Interfaces were the solution, but since they are 100% abstract, I would need to redefine the methods every time, which, to me, beats the purpose of inheritance in this case.
I have thought about making a superior parent (like MovableObject) at the root of the ancestry tree which would include both the Item and Actor classes, but since they are so different in every other way it feels counter logic to have them in the same ancestry tree.
Edit
Thank you all for your responses, I said I'd update when I tried it, and I did but now I realize my whole code is going to need a lot of refactoring so I can't tell you if it works or not right away. Although it did solve my problem since I at least have something to work towards.