package Rectangle;
sub new {
  my ($class, $width, $length)=@_;
  my $hashref = {W=>$width, L=>$length };
  bless ( $hashref, $class);
  return $hashref;
}

sub getArea {
  my $self = shift;
  return $self->{W} * $self->{L};
}

sub getBoundary {
  my $self = shift;
  return 2* ( $self->{W} + $self->{L} );
}

1;


