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...
What will the following code segment display?
``` enum Season {Spring, Summer, Fall, Winter} favoriteSeason; favoriteSeason = Summer; cout << favoriteSeason; ```
Computer Science & Information Technology
________ occurs when people have the combination of leisure time and the tools to be creative.
Fill in the blank(s) with the appropriate word(s).
Computer Science & Information Technology