Ask Question
15 September, 21:44

Making a class's instance variables public and its methods private and accessing those instance variables only through the class's methods and properties facilitates debugging, because problems with data manipulations are localized to the methods

A. True

B. False

+4
Answers (1)
  1. 15 September, 23:10
    0
    False

    Explanation:

    The reason is that it should be the opposite. The class's instance variables should be private, and its methods should be private. In that way, only these methods can access to the private variables. For example, you have a class named Person and a variable called ssn (social security number). It is better to make this ssn variable private (It is actually a private information for a person) so that it cannot be read or modified outside of your class.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Making a class's instance variables public and its methods private and accessing those instance variables only through the class's methods ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers