Not using set and get methods in Java when there are many attributes

Viewed 132

So I have been learning about OOP. I am currently trying to create simple "Hero Profiles" with HP, Mana, intelligence, strength, agility, armor etc. As you can see, there are a lot of attributes I want to add to Hero objects. But these attributes are declared in private not public (Because I was told that it was best to declare these private) and when I declare them in private I have to form set and get methods to each of these attributes. And it consumes so much time and I feel like it is not practical.

Is there a more practical way? Do coders really type these get and set methods even though there are a dozen of them? All I want to do is create two Hero Profiles with these attributes and then simulate a 1v1 battle between the two.

6 Answers
Related