Filters
Question type

Study Flashcards

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.


A) static
B) automatic
C) local
D) public

E) C) and D)
F) B) and D)

Correct Answer

verifed

verified

How many destructors can a class have?


A) no explicit destructors
B) one
C) two
D) any number

E) A) and C)
F) B) and C)

Correct Answer

verifed

verified

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


A) OON
B) OOD
C) UML
D) OOP

E) B) and C)
F) A) and B)

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

What does ADT stand for?


A) abstract definition type
B) asynchronous data transfer
C) abstract data type
D) alternative definition type

E) A) and C)
F) C) and D)

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

implementation file

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


A) accessors
B) mutators
C) constructors
D) destructor

E) All of the above
F) B) and C)

Correct Answer

verifed

verified

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.

A) True
B) False

Correct Answer

verifed

verified

  -Consider the accompanying class definition, and the declaration: rectangleType bigRect; Which of the following statements is correct? A)  rectangleType.print() ;	 B)  rectangleType::print() ; C)  bigRect.print() ; D)  bigRect::print() ; -Consider the accompanying class definition, and the declaration: rectangleType bigRect; Which of the following statements is correct?


A) rectangleType.print() ;
B) rectangleType::print() ;
C) bigRect.print() ;
D) bigRect::print() ;

E) C) and D)
F) A) and D)

Correct Answer

verifed

verified

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.

A) True
B) False

Correct Answer

verifed

verified

True

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


A) :
B) ::
C) $
D) .

E) All of the above
F) B) and C)

Correct Answer

verifed

verified

B

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

A) True
B) False

Correct Answer

verifed

verified

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


A) .
B) ::
C) #
D) ˜

E) All of the above
F) A) and C)

Correct Answer

verifed

verified

  -Consider the accompanying class and member functions definitions. How many constructors are present in the class definition? A)  none B)  one C)  two D)  three -Consider the accompanying class and member functions definitions. How many constructors are present in the class definition?


A) none
B) one
C) two
D) three

E) B) and D)
F) A) and D)

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

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

A) True
B) False

Correct Answer

verifed

verified

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


A)
Which of the following class definitions is correct in C++? A)    B)    C)    D)
B)
Which of the following class definitions is correct in C++? A)    B)    C)    D)
C)
Which of the following class definitions is correct in C++? A)    B)    C)    D)
D)
Which of the following class definitions is correct in C++? A)    B)    C)    D)

E) B) and C)
F) B) and D)

Correct Answer

verifed

verified

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

A) True
B) False

Correct Answer

verifed

verified

  -Consider the UML class diagram shown in the accompanying figure. According to the UML class diagram, how many private members are in the class? A)  none B)  zero C)  two D)  three -Consider the UML class diagram shown in the accompanying figure. According to the UML class diagram, how many private members are in the class?


A) none
B) zero
C) two
D) three

E) A) and C)
F) B) and C)

Correct Answer

verifed

verified

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


A) elements
B) members
C) objects
D) properties

E) A) and B)
F) B) and C)

Correct Answer

verifed

verified

Showing 1 - 20 of 43

Related Exams

Show Answer