<?php

class Range
{

  public $lowerBound;

  public $upperBound;

  public function __construct($lb = 0, $ub = 100)
  {
    $this->lowerBound = $lb;
    $this->upperBound = $ub;
  }

  public function getSize()
  {
    return $this->upperBound - $this->lowerBound;
  }

  public function contains($value)
  {
    return $this->lowerBound <= $value && $value <= $this->upperBound;
  }

  public function __toString()
  {
    return "[{$this->lowerBound},{$this->upperBound}]";
  }
}
