- Encapsulation
- Abstraction
- Inheritance
- Polymorphism
- Improved software maintainability
- Enhanced code reusability
- Better data management and protection
- Increased modularity
- Facilitates collaboration and teamwork
- Creation: Objects are created using constructors when a class is instantiated.
- Usage: Objects perform operations and manage state during their lifetime.
- Destruction: Objects are destroyed using destructors when they go out of scope or are explicitly deleted, freeing up resources.
- Constructor: Initializes an object and allocates necessary resources.
- Destructor: Cleans up and deallocates resources when an object is no longer needed.
- Association: Objects use references to interact without ownership (e.g., a student and a course).
- Aggregation: Objects contain references to other objects but do not own them (e.g., a library and books).
- Composition: Objects own and manage other objects' lifetimes (e.g., a car and its engine).
- Improved performance through efficient data processing
- Reduced memory usage by processing data in manageable chunks
- Enhanced scalability for handling large datasets
- Easier to implement parallel processing and multithreading