Ask Question
15 January, 13:06

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

+1
Answers (1)
  1. 15 January, 13:31
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers