Explain why data members, in particular should be placed in the private section of a class.
What will be an ideal response?
A C++ class contains a complete list of all the functions that can access the private members of that class. This ensures complete control of the private data. This property is important for understanding a program in general. If the data were not private, the client programmer could corrupt the data in any way that the client sees fit. This has considerable potential for mischief.
You might also like to view...
Match the following terms to their meanings:
I. formulas II. semi-selection III. starts all formulas IV. A2+A3 V. =C24*D24 A. pointing to cells when building a formula B. change static numbers into meaningful results C. text D. formula E. equal sign (=)
The capability of a system to fulfill its mission, in a timely manner, in the presence of attacks, failures, or accidents is known as ____.
A. attack resistance B. attack survivability C. system recovery D. system survivability
Which of the four ethnically diverse groups have suffered the most racism, prejudice, and discrimination inflicted by the dominant culture society?
A. First Nation Peoples, African Americans, Muslim Americans, Latino Americans B. Asian Americans, African Americans, Latino Americans, First Nation Peoples C. Latino Americans, First Nation Peoples, African Americans, European Americans D. African Americans, LGBT Americans, Latino Americans, First Nation Peoples
An "if" statement is a selection statement.
Answer the following statement true (T) or false (F)