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

Flashcards

INSY 4306 Ch.11

Christopher Le English 14 cards

Cards in this deck (14)

  1. 1InheritanceAllows a new class to absorb an existing classes members
  2. 2Direct Base ClassBase class which the derived class explicitly inherits
  3. 3Indirect Base ClassAny class above the direct base class in the class hierarchy
  4. 4Class hierarchy begins with classObject
  5. 5The is-a (a-kind-of) relationship representsinheritance
  6. 6Base classes are more ______ and derived classes are more _______"more general" and "more specific"
    Ex:
    Base class is Student
    Derived class is Graduate Student or Undergraduate Student
  7. 7A colon (:) followed by a class name at the end of the class declaration header indicates thatthe class extends the class to the right of the colon
  8. 8Constructors are _____ inheritednot
  9. 9Method ToStringreturns a string representing an object
  10. 10To override a base-class method, a derived class must declare a method with keywordoverride
    The method must have the same signature (method name, number of parameters and parameter types) and return type as the base-class method.
  11. 11The virtual and abstract keywords indicate thata base-class method can be overridden in derived classes
  12. 12override modifierDeclares that a derived-class method overrides a virtual or abstract base-class method
  13. 13Using protected instance variables creates several potential problems.The derived-class object can set an inherited variable’s value directly without validity checking.
    Derived-class methods would need to be written to depend on the base class’s data implementation.
  14. 14All classes inherit directly or indirectly from the ______ classobject

Information

Description
Flashcards on INSY 4306 Ch.11, created by Christopher Le on 06/11/2015.
Created by
Christopher Le
Views
0
Rating

More on Inheritance

Feedback

What is it about?

What do you think of the new look?

How do you like it?