INHERITANCE

computer science

Description

INHERITANCE To continue exploring the concept of inheritance in object-oriented programming, write a paragraph of at least four grammatically correct sentences describing a parent (super) class with two child (sub) classes and each child class having two child classes. You should probably describe concrete objects like animals or vehicles As there is an increment in program size and complexity, you may require a few levels of inheritance, or classes that acquire from another classes, which thusly inherit properties from different classes, etc.. Proceeding with vehicle illustration, a bigger program may require that an extra class be acquainted between Vehicle superclass to further classify the class structure. Case in point, the class Vehicle may be partitioned into the classes Land, Sea and Air, and afterward particular cases of these subclasses can be taking into account medium in which the vehicle being referred to ventures .The Land subclass may be further isolated into subclasses : Car and Bus. The Sea subclass may be further isolated into subclasses: Submarine and Jetski. The Air subclass may be further partitioned into subclasses: Plane and Helicopter. This is a to a great degree modular structure. In some cases all through the lifecycle of project, you may wish to add another attribute to Land .No issue: simply alter the Land class in like manner, and that attribute turns out to be instantly accessible to itself and car, without influencing the usefulness of some other class. The thought of code measured modularity and flexibility is for sure one of one of incredible focal points of OOP. REFERENCES Dennis. (2009). multilevel inheritance in C#. Retrieved from http://codekingdom.blogspot.in/2009/03/multilevel-inheritance-in-c.html


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.