Jeff Sak wrote:I wrote my function for a code and it does compile...
No it doesn't - at least not what you've shown us - because line 33 is
wrong.
And this goes back to what Liutauras said in his post:
first things first
Get rid of
everything that you're not ready to
test, and concentrate on the two
sum() methods you're having trouble with.
When - and ONLY when - you have them working, add back your
rectangular() method (which looks to me like it should be called
square(); or, more correctly,
isSquare()), and test
that.
And when - and ONLY when -
rectangular() is working, add back your
flatten() method...
Do you get the idea? All that extra code is distracting you from the job at hand, which is to get your
sum() methods working properly.
HIH
Winston