Question: 13. Poly C sharp, polymorphism orphism specifically enables the creation of programs that handle_______________ a) classes that are containers for other classes b) large amounts

13. Poly C sharp, polymorphism

orphism specifically enables the creation of programs that handle_______________

a) classes that are containers for other classes

b) large amounts of data with efficiency

c) a wide variety of classes in a general manner

d) None of the above

23.Which of the following statements about abstract base classes is true?

a) abstract base classes may contain data.

b) abstract base classes may not contain implementations of methods.

c) abstract base classes must declare all methods as abstract.

d) abstract base classes must declare all data members not given values as abstract.

24. Consider the abstract class below:

public abstract class Foo { private int a; public int b; public Foo( int aVal, int bVal ) { a = aVal; b = bVal; } // end Foo constructor public abstract int calculate(); } // end class Foo

Any concrete subclass that extends class Foo:

a) Must implement a method called calculate.

b) Will not be able to access the instance variable a.

c) Will not be able to instantiate an object of class Foo.

d) All of the above.

16. Polymorphism allows for specifics to be dealt with during_______________

a. execution

b. compilation

c. programming

d. debugging

17. Polymorphism involves________________

a. the same message sent to a variety of objects, which each interpret their own way

b. a specific message sent to each specific object

c. different messages sent to one object

d. None of the above.

18. Which statement best describes the relationship between base class and derived class types?

a. A derived class reference cannot be assigned to a base class variable and a base class reference cannot be assigned to a derived class variable.

b. A derived class reference can be assigned to a base class variable and a base class reference can be assigned to a derived class variable.

c. A base class reference can be assigned to a derived class variable, but a derived class reference cannot be assigned to a base class variable.

d. A derived class reference can be assigned to a base class variable, but a base class reference cannot be assigned to a derived class variable

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!