Discuss construction and destruction of objects
What will be an ideal response?
? Objects do not create themselves: each object must be instantiated by another object. In most object-oriented languages, an object may implement constructor methods that allows the entity that instantiates the object to provide it with information that it needs from inception to provide any service. Constructors are like other methods and can be even "overloaded," but they have the same name as the class and cannot be accessed after the object has been instantiated.
? Destruction of objects often does not require explicit actions: when other objects no longer refer to an object, it is automatically destroyed by the runtime environment. Sometimes, however, you need to destroy objects explicitly.
You might also like to view...
Research indicates that the number one reason for terminating research and development projects is:
A) That the project is found to be inconsistent with organizational goals. B) The project costs more to complete than originally planned. C) The low probability of achieving technical or commercial success. D) Increased government restrictions.
Which of the following is not an example of organizational citizenship behavior?
A) telling your friends about the company's great work environment B) contributing to a fund for a co-worker to help with medical bills C) discouraging a friend from applying for a job at the company D) working over the weekend to make sure a project gets done E) volunteering to help a colleague meet a deadline