Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Why return type is
Object
? Well, there's only one reason: You're making us returning error strings while correct output is adouble
.That's a very bad design. Please learn how to catch exceptions properly during testing and throw exceptions for input validation instead. Don't teach others bad practices ;-)
Also, the input validation: it's not just besides the point of the task, it's another bad design: in an actually good design you'd instead have different methods for each shape type, along with the appropriate arguments. Again, learn to make good designs before writing a kata: everyone will be learning from you. Please be a responsible role model ;-)
why the rounding? -> use proper method to check for floats:
assertEquals(msg,exp,actual,precision)
Needs Random Tests.
What is a pipe? There are nothing related to
pipe
orwall
in the given wiki page.