Java program to find perimeter using abstract class Shape