GoConqr has a new look! Let us know what you think.

Flashcards

INSY 4306 Ch.12

Christopher Le English 26 cards

Abstract property declarations have the form:

Cards in this deck (26)

  1. 1PolymorphismEnables you to write apps that process objects that share the same base class in a class hierarchy as if they were all objects of the base class
  2. 2In a method call on an object, the type of the ________, not the type of the _______, determines which method is calledactual referenced object, reference
  3. 3An object of a derived class can be treated as an object of itsbase class
  4. 4A base class object is not an object of any of itsderived classes
  5. 5The is-a relationship applies from a derived class to its direct and indirect base classes, but notvice versa
  6. 6The compiler allows the assignment of a base-class reference to a derived-class variable _______ the base-class reference to the derived-class typeif we explicitly cast
  7. 7DowncastingIf an app needs to perform a derived-class-specific operation on a derived-class object referenced by a base-class variable, the app must first cast the base-class reference to a derived-class reference
    This enables the app to invoke derived-class methods that are not in the base class
  8. 8When the compiler encounters a _______ method call made through a variable, the compiler checks the ______ class type to determine if the method can be calledvirtual, variable
  9. 9At execution time, __________ determines the actual method to usethe type of the object to which the variable refers
  10. 10Abstract classes or abstract base classesCannot be used to instantiate objects.
    Too general to create real objects - they specify only what is common among derived classes
  11. 11concrete classesClasses that can be used to instantiate objects.
    Provides the specifics that make it reasonable to instantiate objects
  12. 12An abstract class normally contains one ore more ________ which have the keyword ________ in their declarationabstract methods, abstract
  13. 13A class that contains abstract methods must be declared as an _________ even if it contains concrete (non-abstract) methods.abstract class
  14. 14Abstract property declarations have the form:Abstract property declarations have the form:
  15. 15Constructors and Static Methods cannot be declaredAbstract
  16. 16You can avoid a potential InvalidCastException by using the _______ operator to perform a downcastis or as
  17. 17Assigning a base-class reference to a base-class variable isstraightforward
  18. 18Assigning a derived-class reference to a derived-class variable isstraightforward
  19. 19Assigning a derived-class reference to a base-class variable issafe, because the derived-class object is an object of its base class. However, this reference can be used to refer only to base-class members.
  20. 20Attempting to assign a base-class reference to a derived-class variable is acompilation error. To avoid this error, the base-class reference must be cast to a derived-class type explicitly.
  21. 21A method declared ________ in a base class cannot be overridden in a derived classsealed
  22. 22Methods that are declared private are _________ sealed.implicitly
  23. 23Methods that are declared static are __________ sealedimplicitly
  24. 24Static BindingCalls to sealed methods (and non-virtual methods) are resolved at compile time
  25. 25Interface DeclarationBegins with the keyword interface and can contain only abstract methods, abstract properties, abstract indexers (not covered in this book) and abstract even
  26. 26Keyword operatorIndicates that a method overloads the specified operator

Information

Description
Flashcards on INSY 4306 Ch.12, created by Christopher Le on 09/11/2015.
Created by
Christopher Le
Views
1
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?