no Encapsulation with java - issue?

dalinkwent6

Junior Member
Joined
Jun 30, 2013
Messages
114
Reaction score
16
I am about 75% done with a personal bot project of mine thanks to this sub thread and the ones giving the time to private message me some coding guidance.
I completely disregarded the use of encapsulation on my entire project. Is there going to be an issue that i am going to run into in the future?
I've made mini games in the past but there was no point in using encapsulation because i didn't use some kind of user database.
 
Encapsulation is an important and very useful concept in programming. It helps keeping side-effects under control. In very small projects you might not feel the need of it, but as soon as your project grows, you probably want to use this concept.

Of course you can write correct code without it, but keeping unrelated things separate also helps you in understanding your own code. If I look at stuff I did months ago, it helps to find small modules that do defined things.

To answer your question: I can#t tell you if you run into problems later with your bat, but it is simply a good idea to use the tools that you use the way they are meant to be used. So if your programming language supports modules, you should start understanding how to use them :)
 
If it's just a small project, or a simple program then i don't think encapsulation would be an issue of course.
But having a big software projects and creating a tons of code then you might wanna consider using encapsulation.

Encapsulation is one useful tool and i would suggest understanding and incorporating it. besides, how bad could it be to study this concept.
I tell you, It'll be very useful.
 
Without using encapsulation, you will run into maintenance problems when the size of code base become large. Although you may not be able to appreciate the benefits in small projects, I think it's still better to have it so that you get experience in doing it.
 
Back
Top