encapsulation
Hide functions from outside namespaces
I am building a game and have several gro开发者_运维百科ups of namespaces. One is called \"Engine\" the other called \"Game\". There are several functions and variables that I only want Engine to be a[详细]
2023-01-16 19:56 分类:问答How to encapsulate a file include?
If I have a class that includes a file with a constant like so: define(\"FOO\", \"bar\"); Is there a way to make the class in开发者_如何学Goclude the file with encapsulation so if I use the class s[详细]
2023-01-16 17:14 分类:问答In which scenarios do you use encapsulation?
I would like to know in what scenarios you use encapsulation. The purpose of this question is collaborative. So feel free to share your own experience when the subject is encapsulation.[详细]
2023-01-16 13:48 分类:问答Data encapsulation in C# using properties
currently I am thinking about data encapsulation in C# and I am a little bit confused. Years ago, when I started to learn programing with C++, my professor told me:[详细]
2023-01-16 11:11 分类:问答Where's the Encapsulation?
I\'m a new programmer, so please excuse any dumbness of this question, how the following code is encapsulating pri开发者_C百科vate data? -[详细]
2023-01-16 05:20 分类:问答Domain object properties and encapsulation
I have an Email object with two properties, label and value. System user need to verify their email before they can use it in the system. The verification process is very simple:[详细]
2023-01-14 21:40 分类:问答PHP: What is the purpose of encapsulation?
I\'m talking specifically about the public, private and protected keywords that can apply to properties and methods. I\'ve looked everywh开发者_如何学编程ere and I know what they do and how to use the[详细]
2023-01-14 06:05 分类:问答Why would you mask a base class member?
I have just learned how to mask a base class member (using new) but am missing the point as开发者_开发百科 to why I would want to do that. Does masking provide us with a certain level of protection as[详细]
2023-01-13 17:05 分类:问答Hide to the rest of the world some methods used only by internal classes
Short question I have one C++ domain model. It has some methods used by the internal API as well as other public methods. I don\'t want to expose those API methods. I\'m thinking of using the proxy p[详细]
2023-01-12 09:02 分类:问答Advise requested regarding proper use of encapsulation in Java
I\'m creating a little puzzle game just as a hobby project but the project has now reached a point that there is quite a lot of code (about 1500 lines). Although I\'ve tried to prevent it, the code ha[详细]
2023-01-11 22:40 分类:问答