Exam 12: Object-Oriented Programming: Polymorphism

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

If a method needs to be called polymorphically,what type of reference should be used to point to the object that the method is being called with

(Multiple Choice)
4.8/5
(37)

Unfortunately,polymorphic programs make it difficult to add new capabilities to a system.

(True/False)
4.9/5
(34)

The keyword sealed is applied to methods and classes to:

(Multiple Choice)
4.9/5
(39)

Classes and methods are declared sealed for all of the following reasons,except:

(Multiple Choice)
4.8/5
(40)

Constants declared in an interface are implicitly _______.

(Multiple Choice)
4.9/5
(33)

You may define implementations for abstract methods to act as default implementations.

(True/False)
4.7/5
(41)

Which of the following is false about interfaces

(Multiple Choice)
5.0/5
(43)

A class that implements an interface but does not declare all of the interface's methods must be declared:

(Multiple Choice)
4.7/5
(27)

If a derived class reference is assigned to a base class variable,the variable must be cast back to the derived class before any derived class methods can be called with it.

(True/False)
4.8/5
(30)

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; } Public abstract int calculate(); } Any concrete subclass that extends class Foo:

(Multiple Choice)
4.8/5
(27)

When a request is made to use a derived-class-object method through a base-class reference,C# polymorphically chooses the correct overridden method in the appro priate derived class that's associated with the object.

(True/False)
4.9/5
(35)

By convention,the name for a Car interface is:

(Multiple Choice)
4.7/5
(28)

An interface reference may invoke only the methods that the interface declares.

(True/False)
4.8/5
(29)

A class that implements an interface may not act as a base class for other classes.

(True/False)
4.8/5
(40)

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

(Multiple Choice)
4.9/5
(32)

Polymorphism enables you to:

(Multiple Choice)
4.9/5
(20)

Polymorphism allows the addition of classes providing they were at least considered during program development.

(True/False)
4.7/5
(34)

Polymorphism specifically enables the creation of programs that handle:

(Multiple Choice)
4.8/5
(37)

An abstract class cannot have instance data and non-abstract methods.

(True/False)
4.8/5
(29)

Which of the following characteristics could be used to create an interface for a file,a cat and a house

(Multiple Choice)
4.8/5
(34)
Showing 41 - 60 of 62
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)