Exam 10: Introduction to Inheritance

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

What is another name for a base class in C#?

(Multiple Choice)
4.9/5
(41)

If a base class and a derived class have methods with the same names but different parameter lists, the derived class method overrides the base class method.

(True/False)
4.8/5
(35)

In C#, any class you create is derived from what single built-in class?

(Multiple Choice)
4.9/5
(36)

On some occasions, you might want to access parent class data from a child class.Declaring the parent class field as public would violate the principle of information hiding, but declaring it private would make it inaccessible.How can the proper level of security be achieved?

(Essay)
4.9/5
(29)

What method can you use to return a unique hash for different objects, so long as you explicitly implement it in a derived class?

(Multiple Choice)
4.8/5
(39)

In the event that a method that should be overridden in a child class has its own implementation, what should you declare the base class method to be?

(Multiple Choice)
4.8/5
(32)

When using a derived class that contains a method that overrides a parent class method, what keyword can you use to access the parent class method from within the derived class?

(Multiple Choice)
4.8/5
(36)

Reusing existing classes and interfaces makes the job of programming easier.What are some of the future advantages that come from writing extendable base classes?

(Essay)
4.8/5
(33)

System.Console is an example of a class that can't be extended.What is the reason for this?

(Multiple Choice)
4.8/5
(38)

You can assign a derived class object to an object of any of its superclass types.When you do, what type of conversion occurs from the derived class to base class?

(Multiple Choice)
4.9/5
(44)

What can be used as a type of "fingerprint" for an object, due to the fact that it is unique?

(Multiple Choice)
4.8/5
(23)

What kind of a class might be considered to be "fragile"?

(Multiple Choice)
4.8/5
(28)

Show an example of a class definition that creates a subclass of an existing Employee class, and adds a private double field called commissionRate.What is the total set of fields that an instance of the new class contains?

(Essay)
5.0/5
(33)

What keyword always refers to the superclass of the class in which you use it?

(Multiple Choice)
4.9/5
(31)

When all base class constructors require arguments, you must include a constructor for each derived class you create.Why?

(Essay)
4.9/5
(34)

What type of method has no method statements, and requires the use of an override statement for any class derived from a class that contains it?

(Multiple Choice)
5.0/5
(41)

What happens when you declare a property defined in a base class as override in a derived class?

(Multiple Choice)
4.9/5
(31)

What statement regarding the use of the Object class and classes in general is accurate?

(Multiple Choice)
4.8/5
(38)

A superclass contains all the fields and methods of its subclasses as well as its own more specific fields and methods.

(True/False)
4.8/5
(42)

What object class method returns a string that holds the name of the class, just as GetType() does?

(Multiple Choice)
4.9/5
(32)
Showing 21 - 40 of 40
close modal

Filters

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