Question: 15. For the bag class in Chapter 3 (using a fixed array and a typedef statement) what steps were necessary for changing from a bag

 15. For the bag class in Chapter 3 (using a fixed

15. For the bag class in Chapter 3 (using a fixed array and a typedef statement) what steps were necessary for changing from a bag of integers to a bag of double values? (3 points) A. Change the array declaration from int data[CAPACITY] to double data [CAPACITY and recompile. B. Change the int to double in the typedef statement and recompile C. Round each double value to an integer before putting it in the bag. D. Round each double value to an integer after taking it out of the bag. 16. Is it possible for a member function of a class to activate another member function of the same class? (3 points) A. No. B. Yes, but only public member functions C. Yes, but only private member functions. D. Yes, both public and private member functions can be activated within another member function. 17. Consider this class definition: class quiz public: quiz int f int g const private: double score Which functions can carry out an assignment score-1.0; to the private member variable score? (3 points) A. Both f and g can carry out the assignment. B. f can carry out the assignment, but not g. C. g can carry out the assignment, but not f D. Neither f nor g can carry out the assignment 18. Which kind of functions can access private member variables of a class? (3 points) A. Friend functions of the class B. Private member functions of the class C. Public member functions of the class D. All of the above can access private member variables E. None of the above 19. What will happen if a function is executed and the n for the function is not met? (3 points) A. A B. The n error message will be printed. program will loop indefinitely. C. The system will crash. D. Any of the above results could happen

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!