Object-Oriented Programming, unit: Classes and Objects. Core concepts, terminology, and worked-example cues a college student meets for this unit, building on prior units without repeating them. Front: a term, concept, or short problem cue. Back: the definition, explanation, or answer.
37 cards · basic cards · AI-written, checked twice. Edit anything.
- What is object-oriented programming (OOP)?
Show answer
A programming paradigm organizing code around objects that combine data and behavior
- What is a class?
Show answer
A blueprint defining the properties and behaviors that its objects will have
- What is an object?
Show answer
An instance of a class, with its own state and behavior
- What is instantiation?
Show answer
The process of creating an object from a class
- What is a constructor?
Show answer
A special method that initializes a new object when it is created
- What is an instance variable?
Show answer
A variable belonging to a specific object, holding that object's unique state
- What is a method?
Show answer
A function defined within a class that operates on its objects
- What is 'this' or 'self' typically used for in a method?
Show answer
Referring to the specific object the method is currently operating on
- What is a class variable (static variable)?
Show answer
A variable shared by all instances of a class, rather than belonging to one object
- What is the difference between a class and an object?
Show answer
A class is a blueprint; an object is a concrete instance created from that blueprint
- What is a getter method?
Show answer
A method that returns the value of a private instance variable
- What is a setter method?
Show answer
A method that modifies the value of a private instance variable
- What is method overloading?
Show answer
Defining multiple methods with the same name but different parameter lists
- What is a default constructor?
Show answer
A constructor with no parameters, often automatically provided if none is defined
- What is object state?
Show answer
The current values of an object's instance variables at a given moment