Description
If you already know Python basics, thenĀ this course is the next step in your Python learning path to becoming a Python programmer.
this course is specially made for beginners, who want to understand what is object-oriented programming in Python.
In Python, object-oriented Programming (OOPs) is a programming paradigm that uses objects and classes in programming. It aims to implement real-world entities like inheritance, polymorphisms, encapsulation, etc. in the programming. The central concept of OOPs is to bind the data and the functions that work on that together as a single unit so that no other part of the code can access this data.
Main Concepts of Object-Oriented Programming (OOPs)
- Class
- Objects
- Polymorphism
- Encapsulation
- Inheritance
- Data Abstraction
Class
A class is a collection of objects. A class contains the blueprints or the prototype from which the objects are being created. It is a logical entity that contains some attributes and methods.
To understand the need for creating a class letās consider an example, letās say you wanted to track the number of dogs that may have different attributes like breed, and age. If a list is used, the first element could represent the dogās breed while the second could represent its age. Letās suppose there are 100 different dogs, then how would you know which element is supposed to be which? What if you wanted to add other properties to these dogs? This lacks organization and itās the exact need for classes.
Objects
The object is an entity that has a state and behavior associated with it. It may be any real-world object like a mouse, keyboard, chair, table, pen, etc. Integers, strings, floating-point numbers, even arrays, and dictionaries, are all objects. More specifically, any single integer or any single string is an object. The number 12 is an object, the string āHello, worldā is an object, a list is an object that can hold other objects, and so on. Youāve been using objects all along and may not even realize it.
Who this course is for:
- beginners who want to understand what is object oriented programming