1. The OO principle of inheritance enables youto create a generalized class and then derivemore specialized classes from it. Inheritance is the ability to take on…