can anyone suggest the original way of method overloading
polymerisationhow is it done
Page 1 of 1
2 Replies - 1722 Views - Last Post: 21 September 2005 - 08:22 AM
Replies To: polymerisation
#3
Re: polymerisation
Posted 21 September 2005 - 08:22 AM
I presume you are referring to using different methods based on their inputs.
For example
getArea(int length, int breath
{ return length *breath
}
getArea( int radius)
{ return pie radius squared
}
Then you can get the area of a square by getArea(3,2) or circle by getArea(4)
Thats a simple example.
For example
getArea(int length, int breath
{ return length *breath
}
getArea( int radius)
{ return pie radius squared
}
Then you can get the area of a square by getArea(3,2) or circle by getArea(4)
Thats a simple example.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|