OOP glossary: Journeyman level
21 OOP terms at the Journeyman level, each with a short definition and a link to its full page.
Updated
- Abstract Class
- A class that cannot be created directly, but must be inherited.
- Abstract Method
- A method signature without a method body that must be overridden.
- Aggregation
- A loose "has-a" relationship where the parts can exist without the whole.
- Association
- Any relationship where one object knows about or uses another.
- Big-O Notation
- Big-O Notation refers to how complex code is.
- Cohesion
- How closely the things inside a class belong together; high cohesion is the goal.
- Composition
- Building an object out of other objects it owns ("has-a").
- Composition over Inheritance
- Advice to build behavior by combining objects instead of deep inheritance chains.
- Coupling
- How much one piece of code depends on another; loose coupling is the goal.
- Dependency
- Something a class needs in order to do its job, like a database or an email sender.
- Downcasting
- Treating a parent-typed variable as a specific child type; can fail, so check first.
- Dynamic Dispatch
- Choosing which version of a method to run based on the object's real type, at run time.
- Immutable Object
- An object whose data cannot change after it is created.
- Interface
- A list of methods a class promises to provide, with no code of its own.
- Is-a vs Has-a
- A quick test: "is-a" suggests inheritance, "has-a" suggests composition.
- Mixin
- A small reusable bundle of methods that can be added to unrelated classes.
- Sealed / Final Class
- A class that no other class is allowed to inherit from.
- UML Class Diagram
- A diagram of classes as boxes, with lines showing how they relate.
- Upcasting
- Treating an object as its parent type; always safe and automatic.
- Value Object
- An object defined only by its values; two with equal values are equal.
- Virtual Method
- A method that child classes are allowed to override.