previous
|
start
|
next
Handling Triangle of Width 1
The triangle consists of a single square
Its area is 1
Add the code to
getArea
method for width 1
public int getArea() { if (width == 1) return 1; }
previous
|
start
|
next