Recent Posts

Inheritance

Inheritance allows us to define a class that inherits all the methods and properties from another class.

The parent class is the class being inherited from, also called the base class.
The child class is the class that inherits from another class, also called derived class

Let see this situation


We will establish a parent class


But we have a small warning by class Lebron, means that Python doesn't like an empty class


If we run the program, we can see the children and inheriting the method from the parent







Inheritance Inheritance Reviewed by ohhhvictor on May 11, 2019 Rating: 5

No comments:

Facebook

 photo imagen120.jpg
Theme images by 5ugarless. Powered by Blogger.