answersLogoWhite

0

The basic coding standard is - all variables must be private and you must only expose them to the outside world through accessor/mutator methods. You must not keep them public.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What access attribute should static final variables have?

It should be public


Should a class have any public variables in C?

No. Microsoft should disable (remove) the declaration of any instance variables as public. This will enforce the encapsulation of OO principles.


What is difference between instance variable and class variable in java?

The main difference between the class variable and Instance variable is, first time, when class is loaded in to memory, then only memory is allocated for all class variables. Usually static variables are called class variables. These variables are available throughout the execution of the application and the values are common to the class. You can access them directly without creating an object of the class. Instance variables are normal variables declared in a class, that would get initialized when you create an instance of the class. Every instance of the class would have a copy of the variable and you need a class instance (object) to access these variables


What is attribute in csharp?

Attribute by itself is a class itself in C#. An instance of this class (or the derived class) may be applied to some elements in the program, at runtime, design time or both.I also came across some developers using "attribute" to refer to data members!!So, to get a better answer, perhaps should ask a better/clear-cut question.


When should you use static method and when should we use instance method?

Non-static methods are the "normal" type of methods for a class to have. They use instance variables to perform certain actions. In other words, object A and object B of the same class may behave differently when we call one of their Non-static methods depending on the value of their instance variables. Static methods on the other hand behave the exact same way for all instances of a class. object A and B of the same class will act in the same way when we call one of their Static methods. (*NOTE* Static methods cannot use instance variables)


Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?

You can copy them into global variables in the main() function, then have your other functions access those global variables. Global variables should generally be avoided, however.


Which access label allows the variables to be accessible in both the current assembly and by any classes derived from the base class?

Protected access. This is the same as private access except that derivatives can also gain access. However, in order to preserve encapsulation of the base class, only its private member methods should be granted protected access (and only where that access is necessary). Private data members should never be elevated to protected access.


Which attribute of an HTML form tells the browser how to encode the information?

The enctype attribute indicates how the form data should be encoded. It is placed in the form tag inside it.


Which bakugan attribute should you be?

None or one. Pick


When possible you should advoid using what variables in a program?

Global Variables Or: variables with names longer than 128 characters.


What are non static members in Java?

Local variables (on the stack) or dynamically allocated variables (in the heap) are nonstatic variables. Static variables, constants and globals are all allocated in the program's data segment.


On smackdown vs raw 2009 if you start another career do you lose your attribute?

no you will not lose any attribute and before you exit career you should save