When you define a C++ class, which of the following should be part of the implementation?
a. all declarations of private member variables
b. all declarations for public member functions
c. all explanatory comments for public member declarations.
d. all declarations for private member functions (auxiliary or helping functions)
e. all member function definitions, public and private (implementations of functions).
a) d) and e) are implementation.
Explanation: b) c) are interface. This is information needed to know what the class and its member do, but nothing that tells how the do “it”. The following are implementation: a) private member variables are part of the implementation, not the interface. d) Private member functions are part of the implementation not of the interface e) definitions of functions are part of the implementation not interface.
You might also like to view...
Create a World object and a Turtle object and use the Turtle object to draw a star.
What will be an ideal response?
How does a pipe server for a named pipe support communication with multiple clients?
a) All clients and the pipe server connect to the same pipe object and each client specifies its mode (read, write or duplex). b) The server creates a separate instance of the pipe for each client so that each client can communicate only with the server (and not other clients). The server must use the same mode for each instance of the pipe. c) All clients and the pipe server connect to the same pipe object. However, all of the clients must have a mode compatible with that of the pipe server. For example, if the pipe server uses read mode, all clients must use write mode. d) The server creates a separate instance of the pipe for each client so that each client can communicate only with the server (and not other clients). The server can specify different modes for each instance of the pipe.
The ________ keys on the keyboard allow a user to cycle through all open windows
A) Alt+Tab B) Ctrl+Shift C) Shift+Tab D) Alt+Ctrl
Randomness is an effect that Scatter brushes do well.
Answer the following statement true (T) or false (F)