Posts
Oops Concepts
- Get link
- X
- Other Apps
Oops Key Words OOPS Key words & Definitions In Object-Oriented Programming (OOP) , various keywords and concepts define how objects and classes interact. Below is a comprehensive list: 1. Class A class is like a blueprint for creating objects. 📌 Example: A Car class can define attributes like color, brand, speed and methods like start() and stop() . 2. Object An object is an instance of a class. 📌 Example: A BMW Car object is created from the Car class and has specific properties like black color and 220 km/h max speed . 3. Encapsulation Encapsulation hides the internal details of an object and only exposes necessary parts. 📌 Example: A bank account class hides the balance variable , allowing access only through deposit() and withdraw() methods. 4. Inheritance A child class can inherit properties from a parent class . 📌 Example: A Bird class has a function called fly() . A Parrot class in...