Big idea Inheritance Promotes code reuse Any code that actu

Big idea: Inheritance Promotes code reuse . Any code that actually does something should only exist in one place Promotes code sharing Base classes can be Base classes can be provided in libraries Programmers need only provide code for specifics Code structure similar to problem structure Data-driven problem solving

Solution

Promote code reuse:- Inheritance is the main feature of object oriented language which enables the polymorphism .

By inheriting the base class we can use all the functionalities of the base class .We don\'t need to implement the entire functionality again.we can just inherit it. we can delegate the greenspunned object without explicitly modifying it to the implementing object. Which means we can implement the extra features or override the implementation of the existing methods.It is an essential feature to keep the usable code snippet that can be used in various subclasses. Ex:- The Object class is the default base class in java.

Object oriented languages follows, data-driven approach. which involves solution domain approach the solution depends on the algorithm and the software requirements which entirely depends on coding. the code only need to implement the specific like actions to be taken with the passing data the implementation of main funcions are already implemented in the library.examples of the data-driven approach are operand and operator, functional abstraction. the abstract implementation of the pre-requisite functions implemented by default in the programming library.the objects are implemented with the data-driven approach by passing data by Message passing ,Encapsulation and abstraction.

Ex. the function Math.pow(x,y) the pow function was already implemented in math class we just need to use the function in the way we want.

 Big idea: Inheritance Promotes code reuse . Any code that actually does something should only exist in one place Promotes code sharing Base classes can be Base

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site