Exam 7: Using Classes

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

An abstract data type is a type defined by C++.

Free
(True/False)
4.9/5
(44)
Correct Answer:
Verified

False

C++ is an extensible language.

Free
(True/False)
4.9/5
(52)
Correct Answer:
Verified

True

A(n) ____ language is one to which you can add your own data types.

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

C

What is the difference in memory allocation between a static and a non-static variable?

(Essay)
5.0/5
(42)

Should you use a static class member with an object name or with the class name?

(Essay)
5.0/5
(31)

Can you modify the this pointer? Why or why not?

(Essay)
4.9/5
(32)

The only type of class member function that does not have a this pointer is a ____ member function.

(Multiple Choice)
4.7/5
(40)
Match each term with the correct statement below.
Premises:
intercedes between you and the inner workings of an object
Responses:
access modifier
class
pointer-to-member operator
Correct Answer:
Verified
Premises:
Responses:
intercedes between you and the inner workings of an object
access modifier
(Matching)
4.8/5
(42)
Match each term with the correct statement below.
Premises:
allows the same operation to be carried out differently depending on the object
Responses:
access modifier
implementation section
polymorphism
Correct Answer:
Verified
Premises:
Responses:
allows the same operation to be carried out differently depending on the object
access modifier
(Matching)
4.9/5
(35)
Match each term with the correct statement below.
Premises:
category of objects
Responses:
pointer-to-member operator
this pointer
implementation section
Correct Answer:
Verified
Premises:
Responses:
category of objects
pointer-to-member operator
(Matching)
4.9/5
(38)

Write a class with three private fields and then modify it so that the fields are public. Show both versions.

(Essay)
4.9/5
(43)

You may use the this pointer instead of the class name and scope resolution operator when a local variable and a field name conflict.

(True/False)
4.8/5
(33)

All members of a class share a single storage location for a static data member of that same class.

(True/False)
4.8/5
(43)
Match each term with the correct statement below.
Premises:
a type you define
Responses:
polymorphism
access modifier
class variable
Correct Answer:
Verified
Premises:
Responses:
a type you define
polymorphism
(Matching)
4.8/5
(33)

When you create an object, a block of ____________________ is set aside for the data members.

(Short Answer)
4.9/5
(39)

In what situation would you want to use the this pointer?

(Essay)
4.9/5
(43)

Why should you make class data fields private and not public?

(Essay)
4.8/5
(34)

A class is a new data type you create that is more complex than the basic data types.

(True/False)
4.9/5
(38)

A C++ ____ is an instantiation of a class that can contain both data members and methods.

(Multiple Choice)
4.9/5
(39)

When you create a class, you usually make the functions private.

(True/False)
4.9/5
(42)
Showing 1 - 20 of 56
close modal

Filters

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