Exam 10: Defining Classes

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

The name of a constructor is _____________

Free
(Short Answer)
4.9/5
(37)
Correct Answer:
Verified

the name of the class

What is wrong with the following structure definition? Struct MyStruct { Int size; Float weight; }

Free
(Multiple Choice)
4.7/5
(42)
Correct Answer:
Verified

C

The double colon ::)is known as the __________ operator.

Free
(Short Answer)
4.9/5
(42)
Correct Answer:
Verified

scope resolution operator

In the following class constructor definition,the part of the header starting with a single colon is called the ________________. BankAccount::BankAccount): balance0),interest0.0)

(Short Answer)
4.7/5
(46)

A function may return a structure.

(True/False)
4.8/5
(38)

Developing an ADT means that the user of your class does not have to know the details about how the class is implemented.This is known as

(Multiple Choice)
4.7/5
(40)

A data type consisting of data members and operations on those members which can be used by a programmer without knowing the implementation details of the data type is called

(Multiple Choice)
4.9/5
(40)

If class A is derived from class B,then B is a _______ of A.

(Short Answer)
4.9/5
(33)

If you design a class with private data members,and do not provide mutators and accessors,then

(Multiple Choice)
4.8/5
(44)

If you have a class with a member function called displayostream& out),that will send the values in the class to the parameter stream,and you need to call that function from within another member function,how would you call it to print the data to the screen? ___________________________

(Short Answer)
4.7/5
(39)

If you have a class named myPersonClass,which of the following correctly declare a constructor in the class definition?

(Multiple Choice)
4.9/5
(42)

A member function that allow the user of the class to change the value in a data member is known as

(Multiple Choice)
5.0/5
(40)

A class member function that automatically initializes the data members of a class is called

(Multiple Choice)
4.8/5
(38)

A member function that allows the user of the class to change the value of a private data type is called a ____________________.

(Short Answer)
4.8/5
(42)

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

(Multiple Choice)
4.8/5
(37)

A structure definition ends with the closing brace and a _________.

(Short Answer)
4.7/5
(35)

What can a constructor return? _______________

(Short Answer)
4.9/5
(44)

To assign values to a structure variable,you use the

(Multiple Choice)
4.8/5
(48)

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

(True/False)
4.8/5
(36)

Different class may not have member functions with the same name.

(True/False)
4.9/5
(29)
Showing 1 - 20 of 50
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)