Why should the private member functions in a class almost always have void returns and no inputs?

What will be an ideal response?


The private class functions can see and access the class data directly, so there is no need to pass anything into them or have them return anything. They’ll work on the class data. The need to pass into class functions and pass data out of class functions arise from the “world’s” interaction with the object. When the world need to give the object data, it should be passed into the public set functions. The public get functions will return values to the world.

Computer Science & Information Technology

You might also like to view...

If two conditions must both be true in order for an argument to be acceptable, they should be combined with a Boolean ____ operator.

A. OR B. AND C. NOT D. XOR

Computer Science & Information Technology

Produce a list of the names of all employees who work on the SCCS project.

What will be an ideal response?

Computer Science & Information Technology

A firewall can consist of all devices positioned on the network _____________.

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

Computer Science & Information Technology

When using Windows File Explorer, which view provides the most specific information?

A. List B. Content C. Tiles D. Details

Computer Science & Information Technology