Biology, asked by Anuj1010, 1 year ago

short note on inheritance​

Answers

Answered by Khushibaramate
2

In object-oriented programming, inheritance is the concept that when a class of objects is defined, any subclass that is defined can inherit the definitions of one or more general classes. This means for the programmer that an object in a subclass need not carry its own definition of data and methods that are generic to the class (or classes) of which it is a part. This not only speeds up program development; it also ensures an inherent validity to the defined subclass object (what works and is consistent about the class will also work for the subclass).

Answered by yandapallydurgareddy
0

Answer:

inheritance is the process of creating new glass called derived class from existing class called base class the derived class inherited all the capabilities of the base class but can add properties of it soon the base class remains unchanged by the process the derived class mein override some are all properties of the base class inheritance is very similar to aparent child relationship

Explanation:

any class can be base class more than one class can be derived from a base class and the derived class can be a base class for another

for example a programmer can create a base class named fruit and define derived classes mango orange banana etc each of this derived classes mango orange banana etc has all the features of the base class fruit which additional attributes or features specific to these newly created derived classes mango have its own defined features Orange would have its own define out have its own defined features extra

Similar questions