Question: Write the code for two overloaded methods named getArea. The methods belong to the Square class. The first getArea method should accept two integers. The
Write the code for two overloaded methods named getArea. The methods belong to the Square class. The first getArea method should accept two integers. The second getArea method should accept two double numbers. Both methods should calculate the area by multiplying the first number by the second number. Each should then return the calculated value.
Step by Step Solution
3.47 Rating (173 Votes )
There are 3 Steps involved in it
SquaregetAreaint l int w return l w end of getArea method SquaregetAreadouble ... View full answer
Get step-by-step solutions from verified subject matter experts
