Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions