1/15
Flashcards covering key concepts in object-oriented programming.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Getter
Allows you to read the value of a private attribute.
Class
A template, prototype, or blueprint for objects, where attributes and functionality/behaviour are defined.
Constant Attribute
A field whose value cannot be changed once it has been assigned.
Constructor
A method that is called when an object of a class is created to add values to the fields of an object.
Encapsulation
The bundling of data with the methods operating on that data.
Information Hiding
The concept of making attributes private, hiding them from other objects or classes.
Inheritance
A method for extending existing classes by adding methods and fields to a child class, facilitating code reuse.
Setter
Allows you to alter a private attribute.
Non Static Method
Belongs to the object, with memory allocated for that object only.
Object
A dynamic instance of a class, instantiated using the constructor.
Overloading
More than one method with the same name and different parameters in the same class.
Overriding
More than one method with the same name and same parameters in different, but related classes.
Polymorphism
A programming language's ability to process objects differently depending on their data type or class.
Protected Attribute
Only the class or any derived classes have direct access to the attribute.
Static Method
Belongs to the class. Memory is shared for all objects of that class. Static methods only have access to static attributes.
toString() Method
Provides a string representation of an object’s fields or attributes.