FlashKeepers

Computer Science · College · College and University

Object-Oriented Programming, Unit 3: Inheritance

Object-Oriented Programming, unit: Inheritance. Core concepts, terminology, and worked-example cues a college student meets for this unit, building on prior units without repeating them. Front: a term, concept, or short problem cue. Back: the definition, explanation, or answer.

About this set

38 basic cards for College Computer Science. Set 3 of 7 in Object-Oriented Programming. It opens with "What is inheritance?" and "What is a superclass (parent class)?". Study it alongside the other College sets below.

38 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What is inheritance?
Show answerA mechanism where a class derives properties and behaviors from another class
What is a superclass (parent class)?
Show answerThe class being inherited from
What is a subclass (child class)?
Show answerA class that inherits from another class
What is method inheritance?
Show answerA subclass automatically gaining access to methods defined in its superclass
What is method overriding?
Show answerA subclass providing its own implementation of a method already defined in its superclass
What is single inheritance?
Show answerA class inheriting from exactly one superclass
What is multiple inheritance?
Show answerA class inheriting from more than one superclass
What is a common issue with multiple inheritance?
Show answerAmbiguity when two superclasses define a member with the same name (the diamond problem)
What is the 'is-a' relationship in inheritance?
Show answerA subclass represents a specialized version of its superclass, such as a Dog is an Animal
What is 'super' typically used for in a subclass?
Show answerCalling a method or constructor from the superclass
What is a hierarchy of classes?
Show answerA tree-like structure showing how classes relate through inheritance
What is code reuse, as it relates to inheritance?
Show answerSharing common functionality defined once in a superclass across many subclasses
What is inheritance's main risk if overused?
Show answerTightly coupling classes into rigid hierarchies that are hard to change
What is composition, as an alternative to inheritance?
Show answerBuilding complex behavior by combining objects rather than inheriting from a class
What does 'favor composition over inheritance' mean?
Show answerA design guideline suggesting object composition is often more flexible than deep inheritance

23 more cards in the app

Study this set free