I don't like two things there, please give me advice on them.
1. these "returns 0" - I have no knowledge how to treat the methods which are not applicable for particular shape
2. when I want to create another shape I will have to also add appropriate code block to the print method
<a href="http://faq.javaranch.com/java/UseCodeTags" target="_blank">Use Code Tags!!</a>
#1 - Instead of returning 0 you could return a negative value, clearly indicating that it is not a valid value. You could also throw an exception.
#2 - The print method should be part of the Shape interface, and thus be implemented by each class implementing the interface.
<a href="http://faq.javaranch.com/java/UseCodeTags" target="_blank">Use Code Tags!!</a>
<a href="http://faq.javaranch.com/java/UseCodeTags" target="_blank">Use Code Tags!!</a>

<a href="http://faq.javaranch.com/java/UseCodeTags" target="_blank">Use Code Tags!!</a>
