I am confused on how to do this from an object oriented perspective with maintainability in mind. I was taught when designing an application to always think about change. So I am trying to spend some time on a personal project for design, heck I may want to change it later. The application was inspired by the newest game called Division. It will be a calculator for damage per second.
The technologies I have chosen are Spring, REST, Hibernate, Angular.js 1.0 and maven. Possibly bootstrap but I am unsure at this moment because I am only focusing on the back end. These technologies I understand aren't really needed for this level application but I am doing it for learning purposes.
Now since you have some what of an understanding of what the project is, now the issue I am having. I am having a hard time making the server object oriented with regards to the POJO.
In the division we have weapons and gear. Weapons can have different mods and attributes. Not all weapons can have the same mods such as an Assault Rifle can have a scope but why would a shotgun have a scope? The attributes are relative the same for weapons but the mods vary depending on the type of weapon used. For the gear, gear can have different attributes based on the type of gear it is. Gloves can have attributes that increase critical hit chance while the backpack has an attribute that increases ammo capacity. The gloves can't have an attribute of ammo capacity and the backpack can't have critical hit chance.
Both gloves and the backpack are gear but not the same type of gear. Same thing for weapons, both the assault rifle and shotgun are weapons but not the same type of weapon. I thought about creating a super class called gear and weapon and then subclassing the different weapons/gear. I am confused on how to do this from a professional perspective and as the best learning experience for design.