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.

Computer Science & Information Technology

You might also like to view...

More unintentional errors occur in applications when the variables are declared using the minimum scope needed.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Write a method that modifies the red, green, and blue values of a picture by different amounts. Try it out on diĀ®erent pictures to see if you get any nice results.

What will be an ideal response?

Computer Science & Information Technology

If you bought a server computer that has a pattern of hardware problems and proves to be a "lemon," the System Stability Reports will help you determine this quickly.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Which of the following is NOT a disadvantage of RDP?

A. Sever downtime can cause issues for many users. B. Network issues can cause problems for many users. C. Disaster recovery is more difficult. D. Insufficient processing power in the host system can cause bottlenecks.

Computer Science & Information Technology