+ 3
applying encapsulation to a project?
i am learning c++ and its been nearly a week since i learned encapsulation. i stopped progressing in the main course cause i want to see why it is used.i understand its a method to secure data and perhaps making the code more flexible and thats why i see it as an important subject.i tried youtube and google but i am not still satisfied. anyone with a project idea or perhaps an interesting and related experience want to share?or perhaps checking my codes on my profile and see if i can secure some data with this method. thanks guys and good day!
1 Réponse
+ 8
I think that you must to create private variables with method set and get if you need it.
Sometimes a variable need just a get method. Sometimes a attribute have a method get and set.
// Sorry my english