Exam 10: Classes and Data Abstraction

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

If an object is declared in the definition of a member function of the class, then the object can access both the public and private members of the class.

Free
(True/False)
4.9/5
(32)
Correct Answer:
Verified

True

A(n) ____________________ contains the definitions of the functions to implement the operations of an object.

Free
(Short Answer)
4.8/5
(36)
Correct Answer:
Verified

implementation file

In C++, the scope resolution operator is ____.

Free
(Multiple Choice)
4.8/5
(49)
Correct Answer:
Verified

B

If the heading of a member function of a class ends with the word const, then the function member cannot modify the private member variables, but it can modify the public member variables.

(True/False)
4.9/5
(44)

A(n) ____________________ is a statement specifying the condition(s) that must be true before the function is called.

(Short Answer)
4.8/5
(45)

How many destructors can a class have?

(Multiple Choice)
4.8/5
(35)

Which of the following class definitions is correct in C++?

(Multiple Choice)
4.8/5
(29)

What does ADT stand for?

(Multiple Choice)
4.8/5
(41)

The components of a class are called the ____ of the class.

(Multiple Choice)
4.7/5
(40)

In C++, class is a reserved word and it defines only a data type.

(True/False)
4.9/5
(35)

Non-static member variables of a class are called the ____________________ variables of the class.

(Short Answer)
4.8/5
(40)

  -Consider the UML class diagram shown in the accompanying figure. According to the UML class diagram, how many private members are in the class? -Consider the UML class diagram shown in the accompanying figure. According to the UML class diagram, how many private members are in the class?

(Multiple Choice)
4.9/5
(39)

As parameters to a function, class objects can be passed by reference only.

(True/False)
4.9/5
(36)

  -Consider the accompanying class definition, and the declaration: rectangleType bigRect; Which of the following statements is correct? -Consider the accompanying class definition, and the declaration: rectangleType bigRect; Which of the following statements is correct?

(Multiple Choice)
4.7/5
(41)

A destructor has the character ____, followed by the name of the class.

(Multiple Choice)
4.9/5
(37)

  -Consider the accompanying class and member functions definitions. How many constructors are present in the class definition? -Consider the accompanying class and member functions definitions. How many constructors are present in the class definition?

(Multiple Choice)
4.8/5
(33)

You can use arithmetic operators to perform arithmetic operations on class objects.

(True/False)
4.8/5
(34)

A class and its members can be described graphically using a notation known as the ____ notation.

(Multiple Choice)
4.8/5
(37)

To guarantee that the member variables of a class are initialized, you use ____.

(Multiple Choice)
4.7/5
(40)

A class object can be ____. That is, it is created each time the control reaches its declaration, and destroyed when the control exits the surrounding block.

(Multiple Choice)
4.8/5
(36)
Showing 1 - 20 of 43
close modal

Filters

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