Question
QUESTION 7 The following code shows an example of ____: double square(double number) { return (number * number); } a. coupling b. functional cohesion c.
QUESTION 7
The following code shows an example of ____: double square(double number) { return (number * number); }
a. | coupling | |
b. | functional cohesion | |
c. | tight coupling | |
d. | loose coupling |
2 points
QUESTION 8
To use the applyTransaction() function as a friend to both the Customer and the Transaction class, you must use the following syntax: ____.
a. | friend void applyTransaction(); | |
b. | friend void applyTransaction():Customer, Transaction; | |
c. | void applyTransaction(Customer, Transaction):friend; | |
d. | friend void applyTransaction(Customer, Transaction); |
2 points
QUESTION 9
The ____ operator has left-to-right associativity.
a. | ! | |
b. | -> | |
c. | & | |
d. | ~ |
2 points
QUESTION 10
Which of the following operators has the highest precedence?
a. | || | |
b. | % | |
c. | :: | |
d. | new |
2 points
QUESTION 11
The name of the function that overloads the + symbol is the ____ function.
a. | operator+() | |
b. | +operator() | |
c. | +() | |
d. | op+() |
2 points
QUESTION 12
To ____ operations is to allow several operators to be used within the same expression.
a. | stack | |
b. | overload | |
c. | chain | |
d. | link |
2 points
QUESTION 13
The operator<<() function overloads the ____ operator.
a. | pointer-to-member | |
b. | extraction | |
c. | insertion | |
d. | greater than |
2 points
QUESTION 14
____ is an example of overloading the prefix increment operator.
a. | Inventory& ++operator(int); | |
b. | Inventory& operator++(int); | |
c. | Inventory& operator++(); | |
d. | Inventory& ++operator(); |
2 points
QUESTION 15
____ is an example of overloading the postfix increment operator.
a. | Inventory& ++operator(int); | |
b. | Inventory& ++operator(); | |
c. | Inventory& operator++(int); | |
d. | Inventory& operator++(); |
2 points
QUESTION 16
You can use the ____ as an alternate way to make assignments to an object.
a. | operator<> | |
b. | operator<< | |
c. | operator{} | |
d. | operator() |
2 points
QUESTION 17
A(n) ____ is a very specific instance of a class.
a. | derived class | |
b. | superclass | |
c. | child class | |
d. | object |
2 points
QUESTION 18
To create a class Customer that derives from the class Person, you should use the following syntax: class Customer ____ public Person // public may be replaced // by another class access // specifier { // other statements go here };
a. | -> | |
b. | :: | |
c. | extends | |
d. | : |
2 points
QUESTION 19
Inheritance is said to use the ____ relationship.
a. | has a | |
b. | specializes | |
c. | is a | |
d. | extends |
2 points
QUESTION 20
____ data and functions can be accessed anywhere the class is in scope.
a. | public | |
b. | protected | |
c. | virtual | |
d. | private |
2 points
QUESTION 21
A ____ function cannot be inherited.
a. | public | |
b. | protected | |
c. | friend | |
d. | virtual |
2 points
QUESTION 22
C++ programmers usually use the ____ access specifier for inheritance.
a. | protected | |
b. | public | |
c. | friend | |
d. | private |
2 points
QUESTION 23
Any child class function with the same name and argument list as the parent ____ the parent function.
a. | overrides | |
b. | overloads | |
c. | specializes | |
d. | generalizes |
2 points
QUESTION 24
Any child class function with the same name as the parent, yet with an argument list that differs from the parents, ____ the parent function.
a. | overrides | |
b. | generalizes | |
c. | overloads | |
d. | specializes |
2 points
QUESTION 25
What should be the first line of the class declaration for the class RV that is both a Vehicle and a Dwelling?
a. | class RV : public Vehicle, public Dwelling | |
b. | class RV : public Vehicle and implements public Dwelling | |
c. | class RV : public Vehicle Dwelling | |
d. | class RV : public Vehicle && public Dwelling |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started