1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
3241004551 [841]
3 years ago
10

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
Computers and Technology
1 answer:
Burka [1]3 years ago
3 0

Answer:

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 <em>ssn</em> (social security number). It is better to make this <em>ssn</em> variable <u>private (</u>It is actually a private information for a person<u>)</u> so that it cannot be read or modified outside of your class.

You might be interested in
Which is the purpose of adding B-Roll footage to a sequence?
pav-90 [236]

Answer:

To add richness in content – B-roll footage is used to increase the depth of the main footage and improve storytelling.

Explanation:

Hope this helps

7 0
3 years ago
Who is Majira Strawberry??? My Friend said it so i am wondering
otez555 [7]

Answer:

he/ she is a furry

6 0
3 years ago
Read 2 more answers
1. What conversion factor should be used to convert from Gigaliters to liters?
Ilia_Sergeevich [38]
The conversion factor is 10 to the 9th power
5 0
3 years ago
Problem 6. (Fibonacci Number) Write a program fibonacci.py that accepts n (int) as command-line argument, and writes to standard
77julia77 [94]

Answer:

  1. import sys
  2. def fibonacci(n):
  3.    if(n == 0 or n == 1):
  4.        return n  
  5.    else:
  6.        return fibonacci(n - 2) + fibonacci(n-1)
  7. num = int(sys.argv)  
  8. output = ""
  9. for i in range(1, num+1):
  10.    output += str(fibonacci(i)) + " "  
  11. print(output)

Explanation:

Firstly, we import sys module as we need to accepts n as command line argument (Line 1).

Next, create a function fibonacci takes take one input n (Line 3). If the n is zero or one, return the n itself (Line 4-5). Otherwise, the program shall run the recursive call to the fibonacci function itself by putting n-2 and n-1 as function argument, respectively (Line 6-7).

After that, use the sys.argv to get the command line argument and assign the value to num (Line 9).

Use a for loop to generate the output string by progressively calling the fibonacci function and join the return result to the output string (Line 12-13).

At last print the output string (Line 15).

7 0
3 years ago
............................... ?
Alborosie

............................... ? ................................

6 0
4 years ago
Other questions:
  • 9. Ways in which a person or object is influenced by the surrounding environment​
    8·1 answer
  • Which tool should be used to verify the compatibility of an application run on Windows 10?
    7·1 answer
  • What is information associated with a document to help describe that document called?
    14·1 answer
  • What occurs when a website can know enough about a person's likes and dislikes that it can fashion offers that are more likely t
    9·1 answer
  • The market is in <br> until the price of goods reflects equal supply and demand.
    10·1 answer
  • What best describes the computer's BIOS (basic input-output system)?
    5·1 answer
  • While in class you were introduced to the varieties
    7·1 answer
  • Write a program that assigns values to
    15·1 answer
  • Can someone help plz, I’d really appreciate it
    7·1 answer
  • Question 22 of 25
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!