Object Oriented Programming Using C++ – Section 10

11. If the description of function is “input the quantity, validate that the quantity is greater than 1, subtract 1 from the quantity, and  print the quantity,” the function is

A. sequentially cohesive
B. logically cohesive
C. communicationally cohesive
D. functionally cohesive

Correct Answer:  B. logically cohesive

12. A function that changes an object’s state belongs to the category of

A. inspector functions
B. mutator functions
C. auxiliary functions
D. manager functions

Correct Answer:  B. mutator functions

13. Which of the following pairs of identifier name(s) are(is) considered to be identical?

A. name, names
B. smith, johnsmith
C. identifier 1, identifier_2
D. charl, char_l
E. None of the above

Correct Answer:  C. identifier 1, identifier_2

14. When you create a derived class and instantiate on object

A. the parent class object must be constructed first
B. the child class object must be constructed first
C. the parent class object must not be constructed
D. the child class object must not be constructed

Correct Answer:  A. the parent class object must be constructed first

15. The int type of constants are whole numbers in the range

A. – 23677 to 23678
B. – 32768 to 32767
C. – 32767 to 32768
D. – 32864 to 32865
E. None of the above

Correct Answer:  B. – 32768 to 32767

Leave A Comment?

1 × five =