Exam 7: Introduction to Classes and Objects

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

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

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

B

A C++ member function that sets or changes the value stored in a member variable is called

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

C

When a member function is defined outside of the class declaration, the function name must be qualified with the class name, followed by

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

B

If employee is an instance of a class with 3 member variables (name, salary, and department), the values of all three members will be output by the statement cout << employee;

(True/False)
4.8/5
(46)

Objects can be passed to, and returned from, functions.

(True/False)
4.8/5
(40)

A constructor must have the same name as the

(Multiple Choice)
4.8/5
(36)

ADT stands for _ Data Type.

(Multiple Choice)
4.8/5
(33)

When a constructor does not require that any arguments be passed to it, it is called a(n)_ constructor.

(Multiple Choice)
4.7/5
(38)

The bundling of an object's data and procedures together is called

(Multiple Choice)
4.8/5
(50)

A(n)member function may only be called from a function that is a member of the same class.

(Multiple Choice)
4.8/5
(41)

A class can have a member variable that is an instance of another class. This is called

(Multiple Choice)
4.8/5
(44)

A structure has member variables, like an object, but they are usually all public and accessed directly with the dot operator, instead of by calling member functions.

(True/False)
4.9/5
(42)

When an object or structure variable is passed to a function as a constant reference

(Multiple Choice)
4.9/5
(37)

An Abstract data type (ADT)is a programmer- defined data type that specifies the values the type can hold, the operations that can be performed on them, and how the operations will be implemented.

(True/False)
4.9/5
(37)

When three different objects of a particular class are created, they are said to be separate of the class.

(Multiple Choice)
4.9/5
(43)

A class declaration provides a pattern for creating objects, so when a class is declared it automatically creates an object.

(True/False)
4.8/5
(41)

A class declaration describes an object, but does not create any objects.

(True/False)
4.8/5
(31)

If setSide is a Square class function and box is a Square object, which of the following statements would set the length of box's side to 5?

(Multiple Choice)
4.9/5
(38)

Object- oriented programming is centered around objects that include both data and the functions that operate on them.

(True/False)
4.9/5
(35)

In an ADT the implementation details are the interface through which a program uses it.

(Multiple Choice)
4.8/5
(37)
Showing 1 - 20 of 40
close modal

Filters

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