Read each term where it’s used
In Augment’s notes, a marked term shows its definition when you hover or tap it, and each page ends with the terms it introduces.
In Augment’s notes, a marked term shows its definition when you hover or tap it, and each page ends with the terms it introduces.
54 terms from Object-oriented programming, each defined in a sentence or two, with the part of the syllabus where you first meet it. 26 of them are HL only, and marked.
A class that cannot be instantiated, used as a superclass to share code and to declare methods that its subclasses must provide.
A method declared without a body in an abstract class or interface, which every concrete subclass must override with an implementation.
The principle of exposing what an object can do through a set of method declarations while hiding how each class carries out those methods.
A keyword that sets which parts of a program may use a class member, such as private (only code in the same class) or public (any code).
A public method that returns the value of an object's attribute without changing it, usually named getX() (Java) or get_x() (Python).
A weak has-a relationship in which the containing object holds references to component objects that are created outside it, can be shared or moved, and continue to exist when it is destroyed.
A relationship between two classes in which objects of one class are connected to, and can use, objects of the other, drawn in UML as a solid line between the classes.
A named item of data that a class declares and each object holds a value for.
A template that defines the attributes and methods shared by every object of one kind.
The tree of classes formed by inheritance, with the most general superclass at the root and increasingly specialised subclasses below it.
A strong has-a relationship in which the containing object creates and owns its component objects, which cannot exist independently of it and are destroyed with it.
A class that implements all of its methods, including every abstract method it inherits, and so can be instantiated.
A special method that runs automatically when an object is created and sets the initial values of the object's attributes.
The degree to which one class depends on the internal details of another, so that a change to one forces changes to the other.
The level of access Java gives a member declared with no access modifier, which lets it be used only by classes in the same package.
A general, reusable description of how to arrange classes and objects to solve a problem that recurs in software design.
Polymorphism in which the method to run is chosen while the program runs, from the actual class of the object that receives the call, through method overriding.
The bundling of an object's data and the methods that operate on that data into a single unit, the class.
A design pattern in which a method or class creates and returns objects, choosing the concrete class from its input, so the code that asks for an object depends only on a superclass or interface and never names the concrete classes.
A relationship in which an object of one class contains or holds a reference to one or more objects of another class as part of its state.
The principle that a class keeps its data and implementation details inaccessible to other code, which can use the object only through the methods the class chooses to make public.
The mechanism by which a new class is defined from an existing class, automatically gaining its attributes and methods and adding or changing some of its own.
An object considered as a member of the class it was created from.
A method that is called on a particular object and can read and change that object's instance variables through its self reference.
An attribute of which each object holds its own separate copy, so that its value can differ from object to object.
The process of creating a new object from a class, which allocates memory for the object and runs its constructor.
A named set of method declarations, with no instance variables, that a class promises to implement in full, so objects of unrelated classes can be used through the same methods.
The relationship between a subclass and its superclass, in which every object of the subclass is also an object of the superclass.
A subprogram defined in a class that describes a behaviour of its objects and can use and change their attributes.
Defining several methods (or constructors) with the same name in one class but different parameter lists, so the version called depends on the arguments supplied.
Defining a method in a subclass with the same signature as a method it inherits, so that objects of the subclass run the new version instead of the inherited one.
The name of a method together with the number, types and order of its parameters, which a compiler uses to tell methods apart.
The number of objects of one class that can be linked to a single object of the associated class, written at the end of the association line as a number or a range.
A public method that changes the value of an object's attribute, normally after checking that the new value is valid, usually named setX() (Java) or set_x() (Python).
A special reference value, null in Java and None in Python, meaning that a variable does not refer to any object.
A single entity in a program, created from a class, that holds its own values for the class's attributes and can carry out the class's methods.
A programming paradigm in which a program is built from objects, each combining data with the methods that act on that data, and each created from a class that describes its kind.
A design pattern in which one object, the subject, keeps a list of observer objects that share a common interface, and calls a method on each of them whenever its state changes, so observers can be added or removed without changing the subject.
Giving an operator such as +, < or == a meaning for objects of a user-defined class, by defining the method the language calls for that operator.
The ability of one method name or operator to be used with objects of different types, each type carrying out the operation in its own way.
A style of programming, defined by the way a program's data and instructions are organised and by the concepts a programmer uses to structure the solution.
A level of access that lets a member be used by its own class, by every subclass of that class, and (in Java) by every class in the same package.
The set of public methods (and any public attributes) through which other code can use the objects of a class, as opposed to the hidden details of how the class works.
A value that identifies where an object is stored in memory, held by a variable so that the program can reach the object.
The name a method uses to refer to the object on which it was called, written self in Python and this in Java.
A design pattern that ensures a class has only one instance and gives global access to it, through a private constructor and a static method that creates the instance on first use and returns it on every call.
The set of values held by an object's attributes at a particular moment.
A method that belongs to the class rather than to an object, is called through the class name and has no self reference, so it cannot use instance variables directly.
Polymorphism in which the version of a method to run is chosen before the program runs, by the compiler, from the number and types of the arguments, through method overloading.
A variable that belongs to the class rather than to any object, so that a single copy is shared by all objects of the class.
A class that inherits the attributes and methods of a superclass and may add new members or replace inherited methods with its own versions.
A class whose attributes and methods are inherited by one or more other classes.
A statement inside a subclass constructor that runs the superclass's constructor, so that the inherited attributes are initialised before the subclass adds its own.
A diagram in the Unified Modeling Language that shows classes as boxes listing their attributes and methods, and the relationships between the classes as lines.