Exam 10: Introduction to Inheritance

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

Besides the new keyword, what keyword can you use when defining a derived class member that has the same name as a base class member?

Free
(Multiple Choice)
4.8/5
(38)
Correct Answer:
Verified

C

What term is synonymous with a derived class?

Free
(Multiple Choice)
4.7/5
(47)
Correct Answer:
Verified

D

A class's ToString() method is often a useful debugging aid.

Free
(True/False)
4.7/5
(34)
Correct Answer:
Verified

True

When a class inherits from a base class, it is known as what type of class?

(Multiple Choice)
4.9/5
(40)

A class that is used as the basis for inheritance is known as what type of class?

(Multiple Choice)
4.9/5
(30)

A class that is able to inherit from more than one class utilizes what C# feature?

(Multiple Choice)
4.7/5
(34)

Briefly describe the four public instance methods of the Object class.

(Essay)
4.7/5
(46)

What keyword is an alias for the System.Object class?

(Multiple Choice)
4.9/5
(46)

When you use information hiding by selecting which properties and methods of a class to make public, you are assured that your data will be altered only by the properties and methods you choose and only in ways that you can control.

(True/False)
4.8/5
(28)

What is another name for a derived class in the C# programming language?

(Multiple Choice)
4.7/5
(35)

What are the requirements for overloading the Object class's Equals() method?

(Essay)
4.9/5
(44)

When a derived class contains a method or property that overrides a parent class method or property, how can you use the parent class version from within the subclass? Show an example of a derived class that overrides a parent class method, but then uses the parent class method.

(Essay)
4.8/5
(39)

What happens to a base class member in a derived class that is not hidden by the derived class?

(Multiple Choice)
4.7/5
(31)

What kind of data field or method can be used within its own class or in any classes extended from that class, but cannot be used by "outside" classes?

(Multiple Choice)
4.8/5
(43)

The ability to inherit from more than one class is called multiple inheritance.C# prohibits multiple inheritance, but it does provide an alternative mechanism.Why is multiple inheritance prohibited, and what is the alternative that is provided?

(Essay)
4.8/5
(31)

Explain the sequence of constructors that will be called when you create an object that is an instance of a derived class.

(Essay)
4.7/5
(33)

When presented with two classes that have a parent-child relationship, you can tell which class is the base class and which is the derived class by using the two classes in a sentence using what phrase?

(Multiple Choice)
4.8/5
(38)

The Equals() method compares two objects and returns true if they have the same value.

(True/False)
4.7/5
(45)

Briefly describe the similarities and differences between abstract classes and interfaces.

(Essay)
4.9/5
(34)

What type of class is one from which you cannot create concrete objects, but from which you can inherit?

(Multiple Choice)
4.8/5
(32)
Showing 1 - 20 of 40
close modal

Filters

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