title: Design choice of list of objects or list/map as object property, for the following situations
body: <p>I'm using Flutter/Dart but this is really a basic OOP question I have for all languages.<br />
  I'm looking for an answer that tells me which of the designs below have the best resource management as well as easiest coding.</p>
  <p><a href="https://softwareengineering.stackexchange.com/questions/371880/object-design-class-property-vs-list-of-objects">This similar post</a> does not really satisfy me, I feel I need a better black &amp; white answer that can discern the two designs.</p>
  <p><em><strong>Situation One</strong></em><br />
  A rarely modified object which gets created once but read somewhat often and updated rarely</p>
  <p><em><strong>Situation Two</strong></em>
  A heavily accessed object- mainly read actions but very regularly created, a great many objects 1000+ &amp; they will be regularly filtered<br />
  Example:</p>
  <pre><code>List&lt;SalesIncome&gt; salesIncome = &quot;Sales income from DB&quot;;
  num totalSalesIncome = salesIncome.where((salesPerson) =&gt;
     salesPerson.contains('John Lohn')).toList().reduce((a, b) =&gt; a + b);
  </code></pre>
  <p>Which of the two has best resource management (memory &amp; CPU) &amp; best codeability for CRUD actions further down the chain at end of API? Not asking a subjective question.</p>
  <p>To clarify, I want to know which object design #1 or #2 is best for each situation 1 &amp; 2.</p>
  <pre><code>enum TimePeriod {weekly, monthly, yearly}
  
  #1
  class SalesQuota {
    String salesPerson;
    TimePeriod quotaPeriod;
    num grossIncomeQuota;
    int quotaDate;
  }
  
  #2
  class SalesQuota {
    String salesPerson;
    TimePeriod quotaPeriod;
    Map&lt;int, num&gt; quotaData;
  }
  
  Example for multiple object creation:
  
  #1
  SalesQuota(
    John Lohn,
    TimePeriod.weekly,
    45600.00
    1646125200000)
  SalesQuota(
    John Lohn,
    TimePeriod.weekly,
    50000.00
    1646730000000)
  SalesQuota(
    John Lohn,
    TimePeriod.weekly,
    65000.00
    1647331200000)
  SalesQuota(
    John Lohn,
    TimePeriod.weekly,
    68000.00
    1647936000000)
  
  #2
  SalesData(
    John Lohn,
    TimePeriod.weekly,
    {
      1646125200000: 45600.00,
      1646730000000: 50000.00,
      1647331200000: 65000.00,
      1647936000000: 68000.00,
    }
  </code></pre>