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
(85)
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
(70)
Correct Answer:
Verified

implementation file

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

Free
(Multiple Choice)
4.8/5
(97)
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
(98)

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

(Short Answer)
4.9/5
(86)

How many destructors can a class have?

(Multiple Choice)
4.8/5
(88)

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

(Multiple Choice)
4.8/5
(77)

What does ADT stand for?

(Multiple Choice)
4.8/5
(83)

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

(Multiple Choice)
4.7/5
(75)

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

(True/False)
4.9/5
(69)

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

(Short Answer)
4.8/5
(68)

  -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)
5.0/5
(88)

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

(True/False)
4.9/5
(81)

  -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
(79)

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

(Multiple Choice)
4.9/5
(74)

  -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.9/5
(75)

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

(True/False)
4.8/5
(89)

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

(Multiple Choice)
4.8/5
(90)

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

(Multiple Choice)
4.8/5
(71)

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
(89)
Showing 1 - 20 of 43
close modal

Filters

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