Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python-OOP concepts #94

Open
Rajan2531 opened this issue Feb 11, 2021 · 7 comments
Open

Python-OOP concepts #94

Rajan2531 opened this issue Feb 11, 2021 · 7 comments

Comments

@Rajan2531
Copy link

Presentation about OOP concepts is very short and incomplete for someone who wants to learn it.

@Varun270
Copy link
Contributor

Hello, Actually I would love to solve this issue, but was wondering whether this project is accepting PR's or not.

@joeyajames
Copy link
Owner

Yeah, I haven't really made a complete course on OOP, just an intro to the basics.
Varun, if you have time to write some simple code to explain more OOP concepts, including inheritance and design patterns, etc. that would be great. People really like Jupyter Notebooks, so if you can do code in Jupyter that's best, but just .py text files are okay too. Most important is that the code be simple to understand - a learning tool. Entry/intermediate level programmers should be able to figure it out.

@Varun270
Copy link
Contributor

Hello, @joeyajames I am on it , but I will be coding in pycharm so I guess it would not be an issue you can assign me this issue.

@Varun270
Copy link
Contributor

Can anyone tell me how to push changes in git actually I have made some commit but after pushing those changes I am getting this error - src refspec secondary does not match any. Please someone help me I am a beginner. I am using comand - git push origin [branch name]

@ghost
Copy link

ghost commented May 2, 2021

Can anyone tell me how to push changes in git actually I have made some commit but after pushing those changes I am getting this error - src refspec secondary does not match any. Please someone help me I am a beginner. I am using comand - git push origin [branch name]

You might've missed using git add . or git commit -m "<message>"

@Varun270
Copy link
Contributor

@joeyajames Wanted to know if this repository is still accepting PR's? Would like to do some code Contribution on OOP concepts.

@AnuragNagare
Copy link

    • Class and Object:
    • A class is a blueprint for creating objects. It defines the attributes (data members) and methods (functions) that the objects of the class will have.
    • An object is an instance of a class. It represents a specific instance of the class with its unique attributes and behaviors.
    • Attributes and Methods:
    • Attributes are variables that store data associated with a class and its objects. They define the characteristics of objects.
    • Methods are functions defined within a class that perform actions or provide behavior for objects.
    • Constructor (init):
    • The init method is a special method used to initialize the attributes of an object when it is created. It is called automatically when an object is instantiated.
    • self is a reference to the instance of the class. It is used to access and modify instance attributes within methods.
    • Inheritance:
    • Inheritance allows you to create a new class (subclass or child class) that inherits attributes and methods from an existing class (superclass or parent class).
    • Subclasses can extend or override the behavior of the parent class.
    • Encapsulation:
    • Encapsulation is the principle of bundling the data (attributes) and methods that operate on the data within a single unit (class).
    • It helps in data hiding and provides control over access to class members using access modifiers (e.g., public, private, protected).
    • Polymorphism:
    • Polymorphism allows objects of different classes to be treated as objects of a common base class. It enables code to work with objects of various types in a uniform way.
    • Polymorphism can be achieved through method overriding and method overloading.
    • Method Overriding:
    • Method overriding occurs when a subclass provides a specific implementation of a method that is already defined in its superclass. The subclass method "overrides" the superclass method.
    • Method Overloading:
    • Method overloading is the ability to define multiple methods with the same name in a class, but with different parameter lists. Python does not support method overloading natively.
    • Abstraction:
    • Abstraction is the process of simplifying complex systems by breaking them into smaller, manageable parts.
    • In Python, classes and objects are used to create abstract representations of real-world entities.
    • Class Variables vs. Instance Variables:
    • Class variables are shared among all instances of a class. They are defined within the class but outside any method.
      .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants