finish class Interval with all the operations.