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) all declarations of private member variables , d) all declarations for private member functions (auxiliary or helping functions) and e all member function definitions, public and private (implementations of functions).

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.

Computer Science & Information Technology

You might also like to view...

A ________ is a simplified version of a function used to test the main program.

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

Computer Science & Information Technology

MC Which of the following operators may not be overloaded in Python?

a) {}. b) []. c) (). d) All of the above.

Computer Science & Information Technology

What is the output from print (10 + 3) * 7? Why do you get this output?

What will be an ideal response?

Computer Science & Information Technology

?You work for a company that is growing. Originally, all the users in all departments had access to all the data in the database. It is considered a security risk. What is an appropriate action to reduce the risk?

A. ?Install a two-step login procedure, where the user has to key in additional information for logging in B. Install and provide stronger anti-virus software on the users' computers C. Tweak the firewall parameters so that outgoing traffic can be better controlled D. Assign roles and privileges to users so that only job-relevant data is accessible to the user.

Computer Science & Information Technology