Create calculateLength

calculate Length of each member