To find out the results of sum,sub,multi by using inheritance in java Programming
To find out the results of sum,sub,multi by using inheritance.
Methodology: Inheritance
consists of two main components ,they are parents class and child class . In
inheritance we extends a class in another class .First we create a class and
write properties and methods in this class,it is called parents class .And now
we have to create a another class and extends it in first class ,it is called
chield class . Now in the class we take
methods for sum,sub and multiple . For every methods we have to declear a
veriables and put the result in the veriabls and return the value .Then print
this value .
Source code:
No comments