Rectangle class with are and perimetr as function