write a program to calculate perimeter and area of rectangle in jav