Glossary

  • abstract = A keyword that means you can't create an instance of this class. When used with a method, this means that the method should be implemented later by a child class.
  • Argument = The actual value of a parameter you use when you call a method. For example, all of the stuff in parentheses in a call to a constructor are arguments!
  • Behavior = The "actions" an instance of a class can take. For example, move() is a piece of behavior of an animal.
  • Child class = A class that extends another class. This class has more specifically-defined state and behavior than its parent. For example, Tiger is a child of WildAnimal.
  • Class = A "template" for representing a real-life thing in code. For example, the Tiger class is a template for creating a Tiger. It tells you everything you need to know about what a Tiger does and has.
  • Constructor = A method that creates an instance of a class. For example, the constructor in Tiger sets all of the state for a new Tiger object so that it's ready to use!
  • extends = A keyword that means a class is a child of a parent. For example, Tiger extends WildAnimal means that Tiger is a child of WildAnimal.
  • final = A keyword that means you can't change a piece of code. For example, if a piece of state is final, you can't write any code to reset its value.
  • Getter = A method that retrieves a piece of state for a class. This is important to have when your state is private so child classes can access the state they need!
  • Has-a = Defines a relationship in which a class has state defined by another class, or even itself. For example, WildAnimal has-a WildAnimal for its predator.
  • Inheritance = Describes a parent-child relationship between two classes. For example, a Tiger inherits from a WildAnimal.
  • Instance = An actual "creation" of a class that you can perform actions with. If the Tiger class is a template for a Tiger, then ritchie is an instance of Tiger. This is synonymous with "object."
  • Is-a = Defines an inheritence relationship between two classes. For example, a Tiger is-a WildAnimal means that the Tiger class inherits from the WildAnimal.
  • Method = A piece of code that does something. In object-oriented programming, this is the behavior in a class.
  • Override = A keyword that means you take a method from a parent class, keep the same signature, but change what it does a little bit in the child class.
  • Parameter = The data that needs to be passed to a method, defined in the method signature. For example, all of the stuff in parentheses in the signature for a constructor are parameters!
  • Parent class = A class above another in an object-oriented hierarchy. For example, WildAnimal is the parent class of Tiger.
  • private = A keyword that prevents users from changing and accessing data they shouldn't.
  • Setter = A method that changes the state of an object to some parameter.
  • Signature = The first line of a method, defining what it returns, its parameters, its access, etc.
  • State = The "traits" of a class. For example, a piece of state of a Tiger would be its number of stripes!
  • super = A keyword that references a method belonging to a parent class. For example, calling super in the constructor for Tiger references the constructor for its parent, WildAnimal.
  • this = A keyword that refers to the instance you are doing something with.
  • void = A keyword that means the method does not return any data.