Select the correct rules for encapsulation. If any rules need to be imposed in a particular order, then say so, mentioning which rules.

a) Make all class member variables public members of the class.
b) Place the interface in the header file. What is the interface?
c) Place the implementation in a separate code file (with file extension required by your compiler: .cpp, .cxx, etc), called the implementation file. What is the
implementation?
d) Having private members visible in the interface violates the philosophy of
separating the interface from the implementation. Separate interface and
implementation requires removal of all the private members from the class
definition. You must put these in another part of the class definition in the
implementation.

Except for a) and d), all of the above, in no particular sequence, so long as
all are done. All variable members should be private, not public. The
suggestion in d) to divide the class definition across the implementation and interface files is not possible.

Computer Science & Information Technology

You might also like to view...

The process of sending a received message to someone else is called:

A) replying B) forwarding C) returning D) outgoing

Computer Science & Information Technology

Deleting a bullet in the Text Pane of a SmartArt graphic ________

A) changes the level of the corresponding shape B) deletes the corresponding shape C) has no effect on the corresponding shape D) moves the text in the next bullet to the corresponding shape

Computer Science & Information Technology