Unit 9 & 10: Inheritance & Recursion

Cards (15)

  • inheritance: the process where one class acquires the properties (methods and fields) of another. With the use of inheritance the information is made manageable in a hierarchical order.
  • Superclass: A parent class that contains common attributes and behaviors used by subclasses (children).
  • Subclass: A child class that inherits attributes and behaviors from a superclass (parent).
  • Is A: A relationship between two items that represent a superclass / subclass relationship
  • Has A: A relationship between two items that represents an instance variable relationship.
  • Super: A Java keyword used to refer to the superclass object. In this lesson we saw it used to call the superclass constructor.
  • Method overriding: When a child class overwrites a method inherited from a parent class. Methods have the same name and same parameters.
  • polymorphism: the capability of a method to do different things depending on the object it is acting upon.
  • compile time: describes a task that is or can be done by the compiler,
    without running the program.
  • run time: the state of an application while it is running
  • object superclass: The Object class is the superclass of all other classes in Java.
  • Recursion
    An iterative process where a method calls itself.
  • Base Case: The simplest version of our recursive process. This is the point when the problem cannot be reduced any further.
  • Sequential/Linear Search: A search technique that starts at the first element and goes through each element until it finds the target value.
  • Binary Search: A search that starts at the middle of a sorted array or ArrayList and eliminates half of the array or ArrayList in each iteration until the desired value is found or all elements have been eliminated.