11 tco 4 if a function has a type double parameter that it needs to read but not wri 5347065

11. (TCO 4) If a function has a type double parameter that it needs to read but not write to, pass it by _____. (Points : 7)

value

reference

pointer

address

12. (TCO 4) An overloaded function or operator is an example of _____. (Points : 7)

encapsulation

polymorphism

inheritance

abstraction

13. (TCO 4) Organizing programs into three files (main, class implementation, and class header) supports which important Object-Oriented principle? (Points : 7)

Inheritance

Information hiding

Overload

Polymorphism

14. (TCO 4) Given the following method definition for some class in C++,

int getFeet() const;

this method is declared const so:

(Points : 7)

The method cannot write to passed parameters.

The method cannot write to the data members of the class to which it belongs.

The method cannot read the data members of the class to which it belongs.

All of the above

15. (TCO 4) What is the name of a member function of a class that is responsible for initialization of the member variable(s)? (Points : 7)

Accessor

Constructor

Destructor

Mutator

16. (TCO 4) When organizing a program into three files (main, class implementation, and class header), where are the functions for the user-defined data types implemented? (Points : 7)

main.cpp

class.cpp

class.h

main.h

17. (TCO 4) Given the definition of some class called Employee, and given an Employee pointer variable called myData which is pointing to an array of 20 Employee objects, which of the following statements correctly accesses the getSalary method of the last employee which takes no parameters and returns a double value. (Points : 7)

cout

cout

cout << myData->getSalary[19];

cout

18. (TCO 4) If the following program compiles, what is the data type of foo2?

#include

using namespace std;

int main ()

{

int foo;

int *foo2;

foo2 = &foo;

foo = 1234;

cout

return 0;

}

(Points : 7)

int

pointer to int

object

address

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now