165k views
0 votes
For class definitions, the textbook classifies actions such as keeping totals, counting events, and collecting values as what?

a Book-keeping
b Patterns for object data
c Object member functions
d Collections of object data

1 Answer

5 votes

Final answer:

Actions such as keeping totals, counting events, and collecting values in class definitions are classified as object member functions, handling the state and operations related to an object's data. The correct option is d.

Step-by-step explanation:

For class definitions, actions such as keeping totals, counting events, and collecting values are classified as object member functions. These functions are responsible for managing the internal state of an object and often provide a way to perform operations that relate to the object's data. For instance, if you have a Textbook class, it might have member functions to add a new review, calculate the average review score, or determine if the textbook is over a certain price.

When conducting a survey to collect bivariate data such as the number of pages in a textbook and the cost of the textbook, the collected data can then be organized or reported using various class member functions. Discrete data like the number of books purchased or sold after the semester can be counted and reported categorically, while continuous data such as the amount of money spent on books or received from selling them requires functions that can handle continuous variables.

User Boris
by
7.3k points