Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 14 (1 point) Data members or member functions of a class that are declared to be private may Question 14 options: only be accessed

Question 14 (1 point)

image text in transcribed

Data members or member functions of a class that are declared to be private may

Question 14 options:

only be accessed by the main program

only be accessed by members of the class

not be accessed by the class

are considered to be global variables

Save

Question 15 (1 point)

image text in transcribed

When defining a class, the class should be composed of the kind of values a variable of the class can contain, and

Question 15 options:

member functions for that class

the keyword private

other class definitions

nothing else

Save

Question 16 (1 point)

image text in transcribed

A class member function may be private.

Question 16 options:

True
False

Save

Question 17 (1 point)

image text in transcribed

given the following class definition, how could you use the constructor to assign values to an object of this class? class CDAccount { public: CDAccount(); CDAccount(float interest, float newBalance); float getBalance(); float getRate(); void setRate(float interest); void setBalance(float newBalance); private: float balance, rate; }; and the following object declaration CDAccount myAccount;

Question 17 options:

myAccount = CDAccount(float myRate, float myBalance);

myAccount = CDAccount {myRate, myBalance};

myAccount = CDAccount[myRate, myBalance];

myAccount = CDAccount(myRate, myBalance);

Save

Question 18 (1 point)

image text in transcribed

A member function of a class should be made private

Question 18 options:

always

only if it will never be used

if it will only be used by other members of the class

never, it is illegal to make a member function private.

Save

Question 19 (1 point)

image text in transcribed

Which of the following function declarations will accept either cout or a file stream object as its argument?

Question 19 options:

void output( fstream &outFile);

void output( ofstream &outFile);

void output( ostream &outFile);

void output( iostream &outFile);

Save

Question 20 (1 point)

image text in transcribed

It is possible to have multiple private labels in a class definition.

Question 20 options:

True
False

Save

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_2

Step: 3

blur-text-image_3

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

Data Science Project Ideas In Health Care Volume 1

Authors: Zemelak Goraga

1st Edition

B0CPX2RWPF, 979-8223791072

More Books

Students also viewed these Databases questions

Question

need to convert this table into 1NF,2NF and 3NF

Answered: 1 week ago