Ch. 10: Introduction to Inheritance

Ace your homework & exams now with Quizwiz!

derived class

A class that inherits from a base class.

base class

A class that is used as the basis for inheritance.

Unified Modeling Language (UML)

A graphical language used by programmers and analysts to describe classes and object-oriented processes.

inheritance

A mechanism that enables one class to inherit, or assume, both the behavior and the attributes of another class.

aggregation

A type of composition in which a class contains one or more members of another class that would continue to exist without the object that contains them.

class diagram

A visual tool that provides you with an overview of a class. It consists of a rectangle divided into three sections -- the top section contains the name of the class, the middle section contains the names and data types of the attributes, and the bottom section contains the methods.

inlining

An automatic process that optimizes performance. Because a final method's definition can never be overridden, the compiler can optimize a program's performance by removing the calls to final methods and replacing them with the expanded code of their definitions at each method call location.

fragile

Classes that are prone to errors.

override a method

Doing this in a parent class creates a method in a child class that has the same subclasses of a parent class.

upcast

Doing this to an object changes it to an object of a class higher in the object's inheritance hierarchy.

super

Keyword that refers to the parent or superclass of the class in which you use it.

extends

Keyword used to achieve inheritance in Java.

superclass/subclass

Synonyms for base class and derived class. Not parent/child.

parent class/child class

Synonyms for base class and derived class. Not superclass/subclass.

subtype polymorphism

The ability of one method name to work appropriately for different subclasses of a parent class.

information hiding

The concept of keeping data private.

composition

The relationship in which one class contains one or more members of another class that would not continue to exist without the object that contains them.

polymorphism

The technique of using the same method name to indicate different implementations.

protected

This keyword provides you with an intermediate level of security between public and private access. Protect members are those that can be used by a class and its descendants.

virtual method calls

Those in which the method used is determined when the program runs, because the type of the object used might not be known until the method executes.

"instanceof" operator

determines whether an object that is the operand on the left is a member or descendant of the class that is the operand on the right.


Related study sets

Sensory Physiology Questions for Practice

View Set

Intermediate MC Quiz Study guide

View Set

VN105 CH7 The Skeletal System: Bones and Joints

View Set

Chapter 16 & 17 reading - Genetics

View Set