CIS247C Quiz Week 5

$5.00

CIS247C Quiz Week 5
(TCO 4) Which of the following is not a good example of a hierarchy that could…

 

SKU: CIS 247C Quiz Week 5 DeVry Categories: , Tags: , , , ,

Description

CIS247C Quiz Week 5

CIS247C Quiz Week 5

(TCO 3) Which of the following about composition is true?

Composition promotes code reuse.

Class composition means a class contains objects from another class.

Inheritance and composition can be used together.

All of the above

(TCO 4) Which of the following is true about inheritance?

Child classes are more generalized than their associated parent classes.

Inheritance demonstrates the generalization/specialization relationship.

Parent classes are more specialized than their associated child classes.

Parent classes are more specialized than their associated child classes.

(TCO 4) Select the parent class.

Circle

Shape

Cylinder

Rectangle

(TCO 4) Which of the following is not a good example of a hierarchy that could be modeled by inheritance?

Person

Even numbers

Bank account

Reptile

(TCO 4) Which of the following examples represent the “is-a” relationship in the parent/child format?

Dog/cat

Rectangle/circle

Checking account/saving account

None of the above

(TCO 3) What is the result of over-using inheritance?

System dependencies are created.

Unnecessary relationships are created.

Code is harder to understand.

All of the above

(TCO 3) In object-oriented programming, inheritance is transitive; that means a child class _____.

Inherits only from its parent class

Inherits only selected methods and fields

Inherits all the methods and fields of all its ancestors

Does not inherit any methods or fields

(TCO 4) What inheritance mode is the most general one?

Private

Default

Public

Protected

(TCO 4) Inheritance is only possible in _____ languages.

Procedural

Object-oriented

GUI based

Non-structured

(TCO 6) _____ is the ability to combine data and operations on that data into a single unit.

Inheritance

Encapsulation

Polymorphism

Composition