title: How to avoid getters and setters
body: <p>I have read in many places that "getters and setters are evil". And I understood why so. But I don't know how to avoid them completely. Say Item is a class that has information about item name, qty, price etc...
  and ItemList is a class, which has a list of Items. To find the grand total: </p>
  
  <pre>
  int grandTotal()
  {
  int total = 0;
  
  for (Item item: itemList)
         total += item.getPrice();
  
  return total;
  }
  </pre>
  
  <p>In the above case, how does one avoid getPrice()? The Item class provides getName, setName, etc....</p>
  
  <p>How do I avoid them?</p>