Exam 13: Introduction to Classes

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

When a constructor function accepts no arguments, or does not have to accept arguments because of default arguments, it is called a(n):

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

B

In OOP terminology, an object's member variables are often called its _________, and its member functions are sometimes referred to as its behaviors, or ____________.

Free
(Multiple Choice)
4.9/5
(35)
Correct Answer:
Verified

D

The destructor function's return type is:

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

D

Object-oriented programming is centered around the object, which encapsulate together both the data and the functions that operate on the data.

(True/False)
4.8/5
(34)

Objects are created from abstract data types that encapsulate _______ and _______ together.

(Multiple Choice)
4.8/5
(33)

Class declarations are usually stored here.

(Multiple Choice)
4.9/5
(35)

A private member function is useful for tasks that are internal to the class, but is not directly called by statements outside the class.

(True/False)
4.8/5
(37)

In a procedural program, you typically have __________stored in a collection of variables, and a set of __________ that perform operations on the data.

(Multiple Choice)
4.8/5
(44)

Members of a class object are accessed with the

(Multiple Choice)
4.8/5
(44)

A class is a(n) _____________ that is defined by the programmer.

(Multiple Choice)
4.7/5
(26)

Class objects can be defined prior to the class declaration.

(True/False)
4.9/5
(40)

The process of object-oriented analysis can be viewed as the following steps:

(Multiple Choice)
5.0/5
(35)

More than one constructor function may be defined for a class.

(True/False)
4.8/5
(40)

The constructor function always has the same name as

(Multiple Choice)
5.0/5
(36)

Assume that myCar is an instance of the Car class, and that the Car class has a member function named accelerate. Which of the following is a valid call to the accelerate member function?

(Multiple Choice)
4.8/5
(42)

You must use the private access specification for all data members of a class.

(True/False)
4.9/5
(27)

Objects in an array are accessed with ________, just like any other data type in an array.

(Multiple Choice)
4.9/5
(35)

A ___________ is a member function that is automatically called when a class object is ___________.

(Multiple Choice)
4.8/5
(40)

More than one destructor function may be defined for a class.

(True/False)
4.9/5
(34)

For the following code, which statement is not true? class Point { \quad private: \quad\quad double y; \quad\quad double z; \quad public: \quad\quad double x; };

(Multiple Choice)
4.8/5
(34)
Showing 1 - 20 of 46
close modal

Filters

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