title: When to apply single responsibility principle?
body: <p>I was working on a project that has a class for Teams. But, I don't know if I should simplify these class's attributes, specifically teamSchema &amp; teamClients, and extract it into another object.</p>
  <pre><code>class Team {
      teamNumber: number
      clientsSchema: Array&lt;String&gt;
      teamClients: Array&lt;Client&gt;
  }
  </code></pre>
  <p>Should I extract and turn it into this?</p>
  <pre><code>class Team {
      teamNumber: number
      teamClients: TeamClients
  }
  
  class TeamClients {
      teamClients: Array&lt;Client&gt;
      clientsSchema: Array&lt;String&gt;
  }
  </code></pre>
  <p>background: This is for a red vs blue team cyber security competition where each team has a team # and clients and each team have the same number of clients and same schema for their clients. The schema is just the IPs of competitors boxes (ex. 10.1.1.x where x is the team #) they need to protect.</p>
  <p>full class:</p>
  <pre><code>class Team {
      teamNumber: number
      teamSchema: Array&lt;String&gt;
      teamClients: Array&lt;Client&gt;
  
      constructor(teamNumber, teamSchema, teamClients) {
          this.teamNumber = teamNumber
          this.teamSchema = teamSchema
          this.teamClients = teamClients
      }
  
      // Gets all clients, if client couldn't be found it is pushed as null to the returned array
      getTeamClients(allClients) {
          var teamClients = []
          for(const box of this.teamSchema) {
              const ip = convertXtoNum(box, this.teamNumber)
              const client = getClientByIP(ip)
              teamClients.push(client)
          }
          return teamClients
      }
  
      hasAllSchemaClients() {
          for(const client of this.teamClients) {
              if(client == null) {
                  return false
              }
          }
          return true
      }
  
      getLowestCheckTime() {
          const currentTime = Math.floor(new Date().getTime()/1000)
          var lowestCheckTime = currentTime
          for(const client of this.teamClients) {
              if(client.lastCheckTime &lt; lowestCheckTime) {
                  lowestCheckTime = client.lastCheckTime
              }
          }
          return lowestCheckTime
      }
  }
  </code></pre>