Skip to main content
Engineering LibreTexts

2.10: Vocabulary

  • Page ID
    20793
  • class:
    Previously, we defined a class as a collection of related methods. Now you know that a class is also a template for a new type of object.
    instance:
    A member of a class. Every object is an instance of some class.
    instantiate:
    Create a new instance of a class in the computer’s memory.
    data encapsulation:
    A technique for bundling multiple named variables into a single object.
    instance variable:
    An attribute of an object; a non-static variable defined at the class level.
    information hiding:
    The practice of making instance variables private to limit dependencies between classes.
    constructor:
    A special method that initializes the instance variables of a newly-constructed object.
    shadowing:
    Defining a local variable or parameter with the same name and type as an instance variable.
    client:
    A class that uses objects defined in another class.
    getter:
    A method that returns the value of an instance variable.
    setter:
    A method that assigns a value to an instance variable.
    override:
    Replacing a default implementation of a method, such as toString.
    instance method:
    A non-static method that has access to this and the instance variables.
    identical:
    Two values that are the same; in the case of objects, two variables that refer to the same object.
    equivalent:
    Two objects that are “equal” but not necessarily identical, as defined by the equals method.
    pure method:
    A static method that depends only on its parameters and no other data.
    modifier method:
    A method that changes the state (instance variables) of an object.