Exam 7: Introduction to Classes and Objects

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

If Square is the name of a class, which of the following statements would create a Square object named box?

(Multiple Choice)
4.7/5
(44)

The name of a destructor must begin with

(Multiple Choice)
4.7/5
(31)

A constructor may have a return type of

(Multiple Choice)
4.9/5
(37)

Which of the following statements about ADTs are True.

(Multiple Choice)
4.9/5
(38)

A class declaration provides a pattern for creating objects, but doesn't make any objects.

(True/False)
5.0/5
(38)

A class may have ________ default constructor(s) and ________ destructor(s).

(Multiple Choice)
4.8/5
(32)

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

(True/False)
4.8/5
(37)

If Circle is the name of a class, which of the following statements would create a Circle object named myCircle?

(Multiple Choice)
4.9/5
(42)

ADT stands for Algorithmic Data Type.

(True/False)
4.8/5
(32)

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

(True/False)
4.9/5
(42)

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

(True/False)
4.9/5
(30)

A class must have exactly one constructor.

(True/False)
4.9/5
(24)

In C++ and other object-oriented programming languages, ADTs are normally implemented as classes.

(True/False)
4.9/5
(32)

Which of the following statements correctly creates an enumerated data type and defines an object of that type.

(Multiple Choice)
4.8/5
(30)

If setRadius is a Circle class function and myCircle is a Circle object, which of the following statements would set myCircle's radius to 2.5?

(Multiple Choice)
4.9/5
(35)

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

(Multiple Choice)
4.8/5
(34)

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

(Multiple Choice)
4.9/5
(38)

A C++ member function that uses, but does not change, the value of a member variable is called

(Multiple Choice)
5.0/5
(38)

A constructor must have the same name as the

(Multiple Choice)
4.8/5
(40)

A class declaration creates an object.

(True/False)
4.9/5
(30)
Showing 21 - 40 of 40
close modal

Filters

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