How would you build a class so that it maintains the persistence property of object-oriented programming?

What will be an ideal response?


In order to maintain persistence, you’d need to have the class destructor function write all its data values to a data file. Then when the object was created (constructed), the constructor knows to open and read that data, assigning the values back into the class member data.

Computer Science & Information Technology

You might also like to view...

You can modify any preset in any library and save it as a(n) ____________________ preset; or, if you decide that you don’t want to keep the changes you have made to a set of brush presets, you can reset the Brush panel by clicking Reset Brushes on the panel options menu.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Which of the following statements is true of retargeting?

A. It is targeted at approximately 50% of Website visitors who shop using smartphone applications. B. It employs personalized ads to direct shoppers back to a retailer's Website they previously abandoned. C. It attempts to change buying habits of Web shoppers to get them to consider products they have never considered purchasing before. D. It attempts to change buying habits of Web shoppers by getting them to visit Websites they have not visited before.

Computer Science & Information Technology

A chart can be created in Word or imported from Microsoft ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

Which stage of the laser printing/imaging process involves extreme heat?

a. Fusing b. Transferring c. Exposing d. Writing

Computer Science & Information Technology