I'm working on my java project which is a basic roleplaying-game, and I have an OOD question (I guess it's pretty simple, but it's my first java project). I started working on weapons, I created an abstract Weapon class with an abstract method named attack. Weapon has two subclasses - MeleeWeapon and RangedWeapon, and both have attack method, and it's fine. 

Then I thought about another thing - what would happen if a MeleeWeapon object like spear can be used for close combat and can also be thrown? what would be a good solution in this case?