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
nekit [7.7K]
3 years ago
7

What is the purpose of a destructor? (g) What is the purpose of an accessor?

Computers and Technology
1 answer:
Shkiper50 [21]3 years ago
7 0

Answer:

Destructor:-To free the resources when lifetime of an object ends.

Accessor:-To access private properties of the class.

Explanation:

The purpose of a destructor is to free the resources of the object that it has acquired during it's lifetime. A destructor is called once in the lifetime of the object that is also when  the ifetime of the object ends.

The purpose of the accessors is to access private properties of the class.Accessor cannot change the value of the private members.They are also called getters.

You might be interested in
Write a class Example() such that it has a method that gives the difference between the size of strings when the '-' (subtractio
Mariulka [41]

Answer:

class Example:

def __init__(self, val):

self.val = val

def __gt__(self, other):

return self.val > other.val

def __sub__(self,other):

return abs(len(self.val) - len(other.val))

def main():

obj1 = Example('this is a string')

obj2 = Example('this is another one')

print(obj1 > obj2)

print(obj1 - obj2)

main()

\color{red}\underline{Output:}

3 0
3 years ago
The idea that the number of transistors on integrated circuits doubles approximately every two years is known as Moore's Law.
igor_vitrenko [27]
False<-------------------
7 0
4 years ago
When creating an electronic slide presentation, Lee should avoid
Amanda [17]

I believe the answer is <u>Using sound effects between slides.</u>

Using sound effects between slides can cause for a distraction, and if you are in college, your professor may not score your presentation as well as if it were made without sound effects. Hope this helps!

5 0
3 years ago
Andrew is researching a new operating system for the computers at his workplace. His boss wants the computers to be able to conn
Bumek [7]

Answer:

Windows 8.1 Core

Explanation:

In this particular example, we're going to use Windows 8.1 Core, is the most basic of the window's family, in this case, only we need an OS to connect the hardware with the cloud computing for security and is not necessary another license, in addition, Windows 8.1 core is easiest to use, is so friendly with the user.

6 0
3 years ago
John is selling his pizza for $6 per slice in an area of high demand. However, customers are not buying his pizza.
lesya692 [45]
I think John could lower the price of his pizza. He could also put out advertisements. One more thing John could do is increase options for people to customize their pizza.

7 0
3 years ago
Read 2 more answers
Other questions:
  • What could break the circuit between your home and an electric power plant?
    15·2 answers
  • You (blank) see stop signs on highways.
    9·2 answers
  • Andrew works for a company that develops for a company that develops optic-fiber cables for transmission of data. which layer of
    14·1 answer
  • What does the memory controller prevent
    5·2 answers
  • Rather than simply repeating key terms and concepts, Jeremy focused on the meaning of the information in the chapter and tried t
    13·1 answer
  • Martha wants to create an image for her Web site. Martha should use _____.
    15·2 answers
  • What is the "thinking work" of the computer? How does it help the computer?
    5·1 answer
  • What is a valid response when identity theft occurs
    10·1 answer
  • Ways on how to conserve energy.
    15·1 answer
  • Question 1 of 10
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!