1/22
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Abstraction
A general model of the world, focusing on 'what' it is or does rather than 'how' it works.
Abstract Data Type (ADT)
A programmer-defined data type that is an implementation of an abstraction, characterized by its data type and the operations it can perform.
Encapsulation
Combining attributes and methods into a user-defined type to keep everything an object needs to know/do in one place.
Data Hiding
Concealing the internal structure of a class from the user, allowing usage without needing to understand its workings.
Constructor
A special member function of a class that initializes objects of that class; is automatically called when an object is created.
Destructor
A special member function of a class that is automatically called when an object goes out of scope or is explicitly deleted, cleaning up resources.
Operator Overloading
The ability to define custom behavior for operators (like +, -, etc.) for user-defined types.
Copy Constructor
A constructor that initializes a new object as a copy of an existing object of the same class.
Member Function
A function defined inside a class that operates on the class’s data.
Access Specifier (Public/Private)
Keywords that define the accessibility of class members, with public members accessible from anywhere and private members only accessible from within their class.
Friend Function
A function that is not a member of a class but has access to its private and protected members, declared within the class.
Constant Member Function
A member function that cannot modify any member variables and is declared using the 'const' keyword.
Pass-by-Value
A method of passing arguments to functions whereby a copy of the argument is made.
Pass-by-Reference
A method of passing arguments to functions that allows the function to modify the original variable.
Type Conversion Operator
An operator that enables implicit or explicit typecasting of an object from one type to another.
Memberwise Assignment
The basic way to copy the values of one object to another, attribute by attribute.
Object-oriented Programming (OOP)
A programming paradigm based on the concept of 'objects', which contain data and methods relating to that data.
The this pointer
A pointer that refers to the current instance of a class, providing access to its members.
What is the purpose of abstraction in programming?
The purpose of abstraction in programming is to simplify complex systems by focusing on the essential qualities while hiding unnecessary details.
Can you give an example of abstraction in everyday life?
An example of abstraction in everyday life is driving a car, where the driver knows how to operate the vehicle without needing to understand the intricate mechanics of the engine.
How does abstraction benefit software development?
Abstraction benefits software development by making programs easier to manage and allowing developers to work with higher-level concepts instead of getting bogged down by low-level details.
What are some common techniques used to achieve abstraction in programming?
Common techniques to achieve abstraction in programming include defining abstract classes and interfaces.
Why is abstraction considered a fundamental principle of Object-Oriented Programming (OOP)?
Abstraction is considered a fundamental principle of OOP because it allows developers to create models that reflect real-world entities while hiding implementation details.