Exam 10: Introduction to Inheritance
Exam 1: A First Program Using C#40 Questions
Exam 2: Using Data39 Questions
Exam 3: Using Gui Objects and the Visual Studio Ide40 Questions
Exam 5: Looping40 Questions
Exam 6: Using Arrays40 Questions
Exam 7: Using Methods39 Questions
Exam 8: Advanced Method Concepts39 Questions
Exam 9: Using Classes and Objects39 Questions
Exam 10: Introduction to Inheritance40 Questions
Exam 11: Exception Handling39 Questions
Exam 12: Using Controls40 Questions
Exam 13: Handling Events41 Questions
Exam 14: Files and Streams40 Questions
Exam 15: Making Decisions40 Questions
Select questions type
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)
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
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)